Conversation
…catalog, definitions
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
LGTM — 192 well-structured tests covering previously untested areas across 5 files. All CI checks pass. No issues found.
The tests are thorough and correctly verify the behavior of nativeToolPrompts, TmuxGadget, TmuxControlClient, engine catalog definitions, and GitHub/PM gadget definitions. Mocking strategies are appropriate (readline, child_process, sleep, control client), and edge cases like exit marker parsing, pane-dead fallback, git command validation, and session name sanitization are all well covered.
One trivial nit: afterEach is imported but unused in TmuxGadget.test.ts (line 1) — not worth blocking over since lint passes, but could be cleaned up.
🕵️ claude-code · claude-opus-4-6 · run details
Summary
Adds comprehensive test coverage for the top untested areas, covering ~2,000 previously untested lines across 5 test files with 192 new test cases.
Card: https://trello.com/c/G4wFhC5z/453-add-tests-for-nativetoolprompts-and-tmuxgadget-top-untested-areas
What was added
tests/unit/backends/shared-nativeToolPrompts.test.ts(32 tests) — Tests forbuildToolGuidance,formatParam(all param types: string, boolean, array),buildSystemPrompt, andbuildTaskPrompt(mocking contextFiles module)tests/unit/gadgets/tmux/TmuxGadget.test.ts(25 tests) — All 6 TmuxGadget actions:start(exit detection, timeout, CommandFailedError, git validation),capture(running/exited/not_found),send,kill,list,existstests/unit/gadgets/tmux/TmuxControlClient.test.ts(30 tests) —connect(),checkExitMarker(),parseLine()protocol parsing (begin/end blocks, %output buffering, %message),createWindow()(base64 encoding),killWindow(),sendKeys()tests/unit/backends/catalog.test.ts(33 tests) —DEFAULT_ENGINE_CATALOGintegrity (4 engines, no duplicates) and individual engine definitions (capabilities, settings fields, model selection)tests/unit/gadgets/github/definitions.test.ts(37 tests) +tests/unit/gadgets/pm/definitions.test.ts(35 tests) — Schema integrity for all 10 SCM and 9 PM tool definitionsKey decisions
node:readlineto avoidcreateInterfaceneeding a real streamvi.spyOn(privateClient, 'sendCommand')for TmuxControlClient method testswait: 100in TmuxGadget start tests to make the polling loop exit quicklyTesting
🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details