You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Companion to the audit cleanup. Addresses every High and the highest-
leverage Medium items from TEST_AUDIT_PLAN.md so the test suite catches
real regressions instead of just confirming functions ran.
CLI:
- expectError(fn, match?) helper added to test/helpers/test-setup.ts;
replaces the verbose try { await x; expect.fail(...) } catch {}
pattern that could swallow the wrong error type.
- code/deploy: tighten .calledOnce checks to verify args (instance,
cartridges, code version) and afterOperation hook payload.
- code/activate: assert PATCH path/body and reload toggle order
(active → alternate → active) instead of just call counts.
- auth/token: assert returned JSON shape and that ux.stdout was called
with exactly the access token, not just .calledOnce.
- mrt/env/var/push: positively assert that listEnvVars ran when
asserting setBatchStub was *not* called.
- cip/query: drop echo tautologies (result.sql === input); assert that
the resolved SQL was passed to mockClient.query.
- Promote sinon.stub(odsClient) and makeCommandThrowOnError out of 12
duplicated copies in sandbox tests into the canonical helpers.
- Switch .to.equal(true|false) → .to.be.true|false where present.
SDK:
- logger.test.ts: drop 18 redundant `expect(logger).to.exist` lines
(the followup `.to.be.a('function')` was the real check).
MCP:
- registry: new smoke test invokes a registered handler
(sfnext_get_guidelines) end-to-end; previously only tool names were
asserted.
- theming-store: 25 weak `expect(guidance).to.exist` calls upgraded to
`expect(guidance, '...').to.not.be.undefined` so failures point at
the missing key.
- figma generate-component: replace 7 `array.some(d => …).to.equal(true)`
chains with `array.find(...)` + concrete property assertions so
failures show what actually went wrong.
mrt-utilities:
- create-lambda-adapter-compression.test.ts: replace 39 fixed
`setTimeout(50ms)` waits with the existing event-driven
`stream.waitForEnd()`. Suite runtime drops from ~3s to ~1s.
All 4,076 tests pass (+1 from the new MCP smoke test). Lint and
typecheck clean.
0 commit comments