Current state
No test files of any kind exist in this codebase. Non-trivial production logic in lua/config/util/init.lua — require_all_files_in_config_directory, get_cursor_expression_or_selection, get_system_executable_path, get_formatter_options, get_linter_options, and DAP helpers — has no automated test coverage. The only automated check is StyLua formatting. The headless startup check (nvim --headless -c "qall") exits 0 even on Lua errors (tracked in #141), meaning no green signal is meaningful. Multiple open issues describe confirmed bugs — a crash in send_selection_to_visidata (#90), a mutation bug in get_formatter_options, [d navigating the wrong direction — that tests would have caught before they were committed.
Ideal state
- A busted or plenary test suite exists and runs in CI (e.g. via
nvim-busted-action or plenary.busted)
- At minimum,
lua/config/util/init.lua and lua/config/util/health.lua are covered
- Edge cases documented in open issues (
get_cursor_expression_or_selection discarding multi-line selections, get_formatter_options mutating shared state) are reproduced as failing tests before any fix is written
Out of scope
- Testing plugin behavior (that belongs to upstream plugin test suites)
- Testing filetype configs in
lua/config/plugins/lang/ (auto-loaded; hard to isolate without a running Neovim instance)
Starting points
lua/config/util/init.lua — non-trivial utility functions with no test coverage
lua/config/util/health.lua — health check logic; verifiable in isolation
.github/workflows/ — where a CI job for the test suite would be added
QA plan
- Run the test suite headlessly (e.g.
nvim --headless ... with busted or plenary) — expect tests to be collected and exit 0
- Introduce a deliberate bug in
require_all_files_in_config_directory (e.g. return an empty table) — expect at least one test to fail
- Revert the bug — expect the full suite to pass again
Done when
At least lua/config/util/init.lua has a passing test suite that fails when any of its functions are broken.
Current state
No test files of any kind exist in this codebase. Non-trivial production logic in
lua/config/util/init.lua—require_all_files_in_config_directory,get_cursor_expression_or_selection,get_system_executable_path,get_formatter_options,get_linter_options, and DAP helpers — has no automated test coverage. The only automated check is StyLua formatting. The headless startup check (nvim --headless -c "qall") exits 0 even on Lua errors (tracked in #141), meaning no green signal is meaningful. Multiple open issues describe confirmed bugs — a crash insend_selection_to_visidata(#90), a mutation bug inget_formatter_options,[dnavigating the wrong direction — that tests would have caught before they were committed.Ideal state
nvim-busted-actionorplenary.busted)lua/config/util/init.luaandlua/config/util/health.luaare coveredget_cursor_expression_or_selectiondiscarding multi-line selections,get_formatter_optionsmutating shared state) are reproduced as failing tests before any fix is writtenOut of scope
lua/config/plugins/lang/(auto-loaded; hard to isolate without a running Neovim instance)Starting points
lua/config/util/init.lua— non-trivial utility functions with no test coveragelua/config/util/health.lua— health check logic; verifiable in isolation.github/workflows/— where a CI job for the test suite would be addedQA plan
nvim --headless ...with busted or plenary) — expect tests to be collected and exit 0require_all_files_in_config_directory(e.g. return an empty table) — expect at least one test to failDone when
At least
lua/config/util/init.luahas a passing test suite that fails when any of its functions are broken.