test: in-source testingをplenary.nvimのbustedに置き換える
- [x] plenary.nvimのbusted形式でテストディレクトリを作成
- [x] utils/list.luaのin-source testingをtests/utils/list_spec.luaに移行
- [x] utils/functions.luaのin-source testingをtests/utils/functions_spec.luaに移行
- [x] utils/functions/s.luaのin-source testingをtests/utils/functions/s_spec.luaに移行
- [x] utils/pipe.luaのin-source testingをtests/utils/pipe_spec.luaに移行
- [x] 元のファイルからin-source testingコードを削除
- [x] ファイル末尾に残っていた「-- In-source testing」コメントを削除
- [x] functions_spec.luaの変数名をコードベースの慣例に合わせて
Functionsからfnに変更 - [x] utils.testモジュールを削除し、関数を使用箇所に移動
- [x] テスト実行用のスクリプトとminimal_init.luaを作成
- [x] テストディレクトリのREADME.mdを作成
- [x] READMEに移行されたファイル一覧の情報を追加
完了した作業
移行されたモジュール(4ファイル)
-
lua/utils/list.lua→tests/utils/list_spec.lua -
lua/utils/functions.lua→tests/utils/functions_spec.lua -
lua/utils/functions/s.lua→tests/utils/functions/s_spec.lua -
lua/utils/pipe.lua→tests/utils/pipe_spec.lua
リファクタリング
-
lua/utils/test.luaを削除し、以下のように関数を移動:-
reduce,concat_array_including_nil,to_element_string,make_array_to_string,is_array→utils/list.luaに直接実装 -
deep_equal→utils/functions.luaに直接実装
-
すべてのin-source testing (if vim == nil then)ブロックとコメントを削除し、plenary.nvimのbustedテストフレームワークに完全移行しました。コードベースの命名規則に従い、utils.functionsはfnとして代入しています。
utils.testモジュールは不要になったため削除し、その関数群は実際に使用されているutils.listとutils.functionsに直接実装しました。
Fixes aiya000/dotfiles#60
Original prompt
This section details on the original issue you should resolve
<issue_title>Neovim: in-source testingをplenary.nvimのbustedに置き換える</issue_title> <issue_description>SSIA</issue_description>
<agent_instructions>コミットはconventional commitで。 直近のコミット履歴のメッセージを見てくれてもいい。
PR本文は日本語で。</agent_instructions>
Comments on the Issue (you are @copilot in this section)
Fixes aiya000/dotfiles#60
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.