mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-21 14:36:31 +00:00
build(server): lint:mcp-zod counts a z. call that a line break splits from its dot
Prettier breaks a long schema into z on one line and .object( on the next, which the count read as nothing: formatting the tool files would have taken 134 hand-written fields out of the tally. Whitespace before the dot counts now. Four files already held such a split call, so their entries rise to what they really hold (atlas 23, doc-sync 1, help 4, transit 16).
This commit is contained in:
@@ -65,6 +65,12 @@ describe('the counters', () => {
|
||||
expect(countInlineZod(`${Z}object({ a: ${Z}string(), b: idSchema, c: fizz.x })`)).toBe(2);
|
||||
});
|
||||
|
||||
it('ENV-RATCHET-001b: counts a z. call Prettier broke across lines', () => {
|
||||
expect(countInlineZod(`const s = z
|
||||
.object({ a: idSchema })
|
||||
.strict();`)).toBe(1);
|
||||
});
|
||||
|
||||
it('ENV-RATCHET-002: counts the result envelope and HTTP in a service, not a 2xx status', () => {
|
||||
expect(
|
||||
countServiceIdioms(`return { error: 'x', ${STATUS} };\nthrow ${HTTP}{}, 400);\nreturn { status: 200 };`),
|
||||
|
||||
Reference in New Issue
Block a user