@emseepea/testing 0.11.1 → 0.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -88,8 +88,27 @@ try {
|
|
|
88
88
|
}
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
+
`running.close()` is idempotent. It closes every client created by
|
|
92
|
+
`running.connect()`, then closes the server or child process. You do not need to
|
|
93
|
+
call `client.close()` separately.
|
|
94
|
+
|
|
95
|
+
In Vitest, register cleanup with `onTestFinished`:
|
|
96
|
+
|
|
97
|
+
```js
|
|
98
|
+
import { startEmseepea } from "@emseepea/testing";
|
|
99
|
+
import { it, onTestFinished } from "vitest";
|
|
100
|
+
|
|
101
|
+
it("serves the expected tools", async () => {
|
|
102
|
+
const running = await startEmseepea(await createApp());
|
|
103
|
+
onTestFinished(() => running.close());
|
|
104
|
+
|
|
105
|
+
const client = await running.connect();
|
|
106
|
+
// assertions
|
|
107
|
+
});
|
|
108
|
+
```
|
|
109
|
+
|
|
91
110
|
Passing a test context with an `after` hook, as in the first example, registers
|
|
92
|
-
|
|
111
|
+
the same `close()` operation automatically.
|
|
93
112
|
|
|
94
113
|
Set `protocolVersion` on `startEmseepea` or `startMcpServer` to test one of the
|
|
95
114
|
server's documented protocol revisions. Omitting it keeps the `2026-07-28`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emseepea/testing",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"description": "MCP integration and semantic testing helpers",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"test:built": "node --test test/*.test.mjs"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@emseepea/server": "0.
|
|
44
|
+
"@emseepea/server": "0.12.0",
|
|
45
45
|
"@modelcontextprotocol/client": "2.0.0"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|