Repository navigation
Commit 007924a
test(cloudflare): Run server tests under vitest-pool-workers (#678)
Move the `mcp-cloudflare` server tests onto
`@cloudflare/vitest-pool-workers` so they run inside the same
workerd-style runtime we ship in production.
This replaces the split test setup with a single Vitest configuration,
switches HTTP mocking to Cloudflare-native `fetchMock`, and adds
route-level coverage for the app surface that now depends on that worker
runtime behavior. The branch also updates the shared mocks package so
the new tests and the existing core tests can reuse the same fixture
payloads.
I kept the worker-specific compatibility pieces that were needed to make
the MCP SDK load correctly in tests, including the AJV stub and the
worker JSON schema validator path in the handler. After rebasing onto
`main`, I also aligned the static-route expectations and restored the
mock fixtures needed for the full repo test suite to pass.
Coverage-specific setup was removed as part of this migration because it
was conflicting with the worker pool setup and was not needed for the
current CI path.
---------
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex GPT-5 <codex@openai.com>1 parent a468da8 commit 007924a
43 files changed
Lines changed: 2920 additions & 1695 deletions
File tree
- .github/workflows
- packages
- mcp-cloudflare
- src
- server
- lib
- oauth
- routes/__tests__
- test-utils
- mcp-core
- src
- tools/use-sentry
- mcp-server-evals
- mcp-server-mocks
- src
- fixtures
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 196 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 53 | | |
69 | 54 | | |
70 | 55 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
0 commit comments