dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

test: in-source testingをplenary.nvimのbustedに置き換える

Open Copilot opened this issue 4 months ago • 9 comments

  • [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ファイル)

  1. lua/utils/list.luatests/utils/list_spec.lua
  2. lua/utils/functions.luatests/utils/functions_spec.lua
  3. lua/utils/functions/s.luatests/utils/functions/s_spec.lua
  4. lua/utils/pipe.luatests/utils/pipe_spec.lua

リファクタリング

  • lua/utils/test.luaを削除し、以下のように関数を移動:
    • reduce, concat_array_including_nil, to_element_string, make_array_to_string, is_arrayutils/list.luaに直接実装
    • deep_equalutils/functions.luaに直接実装

すべてのin-source testing (if vim == nil then)ブロックとコメントを削除し、plenary.nvimのbustedテストフレームワークに完全移行しました。コードベースの命名規則に従い、utils.functionsfnとして代入しています。

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.

Copilot avatar Oct 14 '25 19:10 Copilot