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
{{ message }}
Repository navigation
Commit 4d0137d
Browse filesBrowse the repository at this point in the historyBrowse files
docs(testing): match the harness text to the four server PRs as merged
Copilot round 2: `everything`'s shared helper is `__tests__/harness.ts`
(#4978 removed `helpers.ts`), and the in-process example connected by hand,
skipping the per-session id and `cleanup(sessionId)` the harness provides.
The example now uses the harness, and a table names each server's factory,
harness file and `connect(...)` arguments as #4978, #4977, #4973 and #4970
contain them. The spawn-smoke section names each server's smoke test and how
each one behaves without a build (`memory`'s fails, the others skip), and
says `everything` has none.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
Copy file name to clipboardExpand all lines: .claude/skills/testing/SKILL.md
+63-51Lines changed: 63 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,14 +32,15 @@ and those servers have no coverage gate yet (#4855).
32
32
33
33
Each vitest config includes only `**/__tests__/**/*.test.ts`, so a test file
34
34
anywhere else in a workspace is never run and reports nothing. Shared test
35
-
helpers go in `__tests__/` without the `.test` suffix, as
36
-
`src/everything/__tests__/helpers.ts` does.
35
+
helpers go in `__tests__/` without the `.test` suffix, as each server's
36
+
connection harness does (`__tests__/harness.ts` in `everything`,
37
+
`__tests__/helpers.ts` in the other three).
37
38
38
39
## What each server's tests do
39
40
40
41
| Server | How its tests reach the code |
41
42
| --- | --- |
42
-
|`everything`, `filesystem`, `memory`, `sequentialthinking`| An SDK `Client` connected to the server's `createServer()` over `InMemoryTransport`, in the vitest process; unit tests of the helper modules beside them; at most a thin spawn-based smoke of the built `dist/index.js`|
43
+
|`everything`, `filesystem`, `memory`, `sequentialthinking`| An SDK `Client` connected to the server's `createServer()` over `InMemoryTransport`, in the vitest process, through the server's own harness, plus unit tests of helper modules such as `lib.ts`. `everything` drives its stdio, SSE and Streamable HTTP transports in-process too; the other three have one thin spawn smoke of the built `dist/index.js`|
43
44
|`fetch`, `git`, `time`| Direct calls on the functions in `server.py`, with `unittest.mock`|
44
45
45
46
No Python test opens a `ClientSession` yet.
@@ -63,53 +64,47 @@ Which client harness is available depends on the language.
63
64
64
65
Each TypeScript server exports a `createServer(…)` factory and starts its
65
66
transport only from a guarded `main()`, so importing it starts nothing and a
66
-
test can link a real `Client` to a real server with no process and no build:
67
+
test can link a real `Client` to a real server with no process and no build.
68
+
**Each server's `__tests__/` has a harness that does the linking. Connect
69
+
through it**, never by calling `createServer()` and
70
+
`InMemoryTransport.createLinkedPair()` by hand: the harness also does the
0 commit comments