Commit 45a2e16
fix(client): compile
`packages/client/tests/integration/01-discovery.test.ts` was read by neither
gate: `tsconfig.test.json`'s `include` stopped at `src/**/*` and no `exclude`
anywhere named the file (the #5476 shape — outside every program, not inside an
excluded region), while the regular `vitest.config.ts` excludes
`tests/integration/**` because the suite needs a live server. Two channels, both
blind, and the suite had drifted onto a `client.discovery` property
`ObjectStackClient` does not have.
- `tsconfig.test.json`: `include` gains `tests/**/*`. The vitest split is
untouched — compiling the file does not run it, and the suite still needs the
external server its README describes. tsc is the gate that works without one.
- `01-discovery.test.ts`, all three errors the inclusion surfaces:
- TC-DISC-004 read `client.discovery`, which never existed on the class
(TS2339 x2). The payload lives on the private `discoveryInfo` field, read
here through the bracket-notation escape hatch exactly as this package's
`src/client.hono.test.ts` already reads it. No public API was invented for
the suite. The case also now asserts `routes` is populated — the thing
"Route Resolution" is named for, and what `getRoute()` steers every later
call with — so assertion strength goes up, not down.
- TC-DISC-002's `discovery.apiName.length` (TS18048) is reached optionally and
asserted, per #5449's convention in this package: a missing value fails
`toBeGreaterThan` rather than being waved through by a `!` or a `?? ''`.
Which KEY that assertion should name is a producer-side contract question,
not a test's to settle — metadata-protocol emits the deprecated `apiName`
and no `name`, the runtime dispatcher emits `name` and no `apiName` —
so the spelling is left alone and the evidence is recorded on #4828.
Reverse verification, both directions predicted before running: restoring the
old assertions under the new `include` reports exactly the 3 original errors;
restoring the old `include` as well makes them vanish — rolling this change back
does not go red, it goes BLIND, which is the defect being fixed.
Fixes #5544
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016FNvXhtSdnEGEfLEsMmvxhtests/integration/ and point its discovery assertions at the surface that exists1 parent 229d29e commit 45a2e16
2 files changed
Lines changed: 35 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
66 | 80 | | |
67 | 81 | | |
68 | 82 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | | - | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
0 commit comments