@@ -304,9 +304,10 @@ codex.setup({
304304})
305305```
306306
307- See ` tests/unit/init_spec.lua ` for the canonical examples of all mock factories:
308- ` make_provider ` , ` make_session_store ` , ` make_logger ` , ` make_formatter ` ,
309- ` make_selection ` , ` make_fake_vim ` , and the ` setup_with_deps ` helper.
307+ See ` tests/unit/helpers/init_spec_helpers.lua ` for the canonical examples of
308+ all mock factories: ` make_provider ` , ` make_session_store ` , ` make_logger ` ,
309+ ` make_formatter ` , ` make_selection ` , ` make_fake_vim ` , and the
310+ ` setup_with_deps ` helper.
310311
311312### Contract Tests
312313
@@ -372,8 +373,10 @@ When cutting a new release tag:
372373 concern; otherwise keep it in ` init.lua ` .
3733742 . ** User command** -- Register the ` :Codex* ` command in
374375 ` lua/codex/nvim/commands.lua ` , delegating to the API function.
375- 3 . ** Unit tests** -- Add test cases in ` tests/unit/init_spec.lua ` covering the
376- new API function (happy path, error path, auto-open behaviour).
376+ 3 . ** Unit tests** -- Add test cases in the command-focused
377+ ` tests/unit/init_*_spec.lua ` files (happy path, error path, auto-open
378+ behaviour), and use ` tests/unit/helpers/init_spec_helpers.lua ` for shared
379+ mocks and setup helpers.
3773804 . ** Command dispatch tests** -- If the command exercises a new code path beyond
378381 existing patterns, add targeted tests.
3793825 . ** README update** -- Add the command to the Commands section and the Lua API
0 commit comments