Surfaced while adding the fleet product tools in #63 (wave-av/wave-context#72).
This repo has no tests: package.json declares build / dev / type-check / lint / prepublishOnly and no test script, and there are zero test files under src/. The whole gate is tsc --noEmit + eslint.
That's thin for what this package is. src/tools/index.ts is the single registry that drives both transports (stdio McpServer and the in-process Agent SDK server) — its own comment records that a hand-maintained parallel list previously "fabricated tool names" and sank sdk-server.ts. The duplicate-name guard that now prevents a repeat runs at import time and is only exercised if something imports the registry, which nothing in CI currently does.
Concretely untested today:
- the registry's duplicate-name throw
- every tool's URL/query construction (e.g. that optional args are omitted rather than sent as
undefined)
- error mapping —
errorContent(status, body) vs a success path
getBaseUrl() (app host) vs getApiBaseUrl() (gateway host) not being crossed, which is exactly the class of mistake that produces a silent 404
- rate-limit retry behavior in
waveFetchWithRateLimit
None of this needs network: the valuable tests here are pure — build the request, assert the URL and headers, feed a stubbed response through the handler and assert the rendered text. A node --test + tsx setup (the convention wave-context already uses) would cover it without adding a heavy framework.
Suggested first increment
- Add
"test": "node --import tsx --test src/**/*.test.ts" and wire it into the checks workflow.
- One test that imports
allTools and asserts names are unique + the expected count — this alone re-arms the anti-drift guard in CI.
- Per-area tests asserting the request URL each tool builds, including that optional parameters are omitted when absent.
Filed rather than bundled into #63 so that PR stays a feature change instead of quietly introducing test infrastructure.
Surfaced while adding the fleet product tools in #63 (wave-av/wave-context#72).
This repo has no tests:
package.jsondeclaresbuild/dev/type-check/lint/prepublishOnlyand notestscript, and there are zero test files undersrc/. The whole gate istsc --noEmit+eslint.That's thin for what this package is.
src/tools/index.tsis the single registry that drives both transports (stdioMcpServerand the in-process Agent SDK server) — its own comment records that a hand-maintained parallel list previously "fabricated tool names" and sanksdk-server.ts. The duplicate-name guard that now prevents a repeat runs at import time and is only exercised if something imports the registry, which nothing in CI currently does.Concretely untested today:
undefined)errorContent(status, body)vs a success pathgetBaseUrl()(app host) vsgetApiBaseUrl()(gateway host) not being crossed, which is exactly the class of mistake that produces a silent 404waveFetchWithRateLimitNone of this needs network: the valuable tests here are pure — build the request, assert the URL and headers, feed a stubbed response through the handler and assert the rendered text. A
node --test+tsxsetup (the convention wave-context already uses) would cover it without adding a heavy framework.Suggested first increment
"test": "node --import tsx --test src/**/*.test.ts"and wire it into the checks workflow.allToolsand asserts names are unique + the expected count — this alone re-arms the anti-drift guard in CI.Filed rather than bundled into #63 so that PR stays a feature change instead of quietly introducing test infrastructure.