Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Feature Request: Vitest v3 support #7847

Open
SegaraRai opened this issue Jan 21, 2025 · 1 comment · May be fixed by #7923
Open

🚀 Feature Request: Vitest v3 support #7847

SegaraRai opened this issue Jan 21, 2025 · 1 comment · May be fixed by #7923
Labels
enhancement New feature or request vitest Relating to the Workers Vitest integration

Comments

@SegaraRai
Copy link

SegaraRai commented Jan 21, 2025

Describe the solution

Vitest has recently released v3 and it would be great if vitest-pool-workers would support Vitest v3.

When I tried Vitest v3 I got the following error message.
It seems that the test runner now depends on node:timers and node:timers/promises.

 DEV  v3.0.2 D:/path/to/project/packages/backend

[vpw:wrn] You're running `[email protected]`, but this version of `@cloudflare/vitest-pool-workers` only officially supports `vitest 2.0.x - 2.1.x`.
`@cloudflare/vitest-pool-workers` currently depends on internal Vitest APIs that are not protected by semantic-versioning guarantees.
Your tests may work without issue, but we can not guarantee compatibility outside of the above version range.
Using vars defined in .dev.vars
[vpw:inf] Starting single runtime for vitest.config.ts...
[mf:wrn] The latest compatibility date supported by the installed Cloudflare Workers Runtime is "2024-12-30",
but you've requested "2025-01-01". Falling back to "2024-12-30"...
workerd/server/server.c++:3319: error: Fallback service failed to fetch module; payload = ; spec = /?specifier=%2Fnode%3Atimers%2Fpromises&referrer=%2FD%3A%2Fpath%2Fto%2Fproject%2Fnode_modules%2F.pnpm%2Fvitest%403.0.2_%40types%2Bnode%4022.10.7%2Fnode_modules%2Fvitest%2Fdist%2Fchunks%2FrunBaseTests.Ba8jtu6O.js&rawSpecifier=node%3Atimers%2Fpromises
workerd/server/server.c++:3319: error: Fallback service failed to fetch module; payload = ; spec = /?specifier=%2Fnode%3Atimers%2Fpromises&referrer=%2FD%3A%2Fpath%2Fto%2Fproject%2Fnode_modules%2F.pnpm%2Fvitest%403.0.2_%40types%2Bnode%4022.10.7%2Fnode_modules%2Fvitest%2Fdist%2Fchunks%2FrunBaseTests.Ba8jtu6O.js&rawSpecifier=node%3Atimers%2Fpromises
Error running worker: Error: No such module "node:timers/promises".
  imported from "D:/path/to/project/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vitest/dist/chunks/runBaseTests.Ba8jtu6O.js"
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
                                                                                                                                                                                                                                                                     
Vitest caught 1 unhandled error during the test run.                                                                                                                                                                                                                 
This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.                                                                                                                                                            
                                                                                                                                                                                                                                                                     
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: No such module "node:timers/promises".
  imported from "D:/path/to/project/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vitest/dist/chunks/runBaseTests.Ba8jtu6O.js"
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
@SegaraRai SegaraRai added the enhancement New feature or request label Jan 21, 2025
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Jan 21, 2025
@edmundhung edmundhung added the vitest Relating to the Workers Vitest integration label Jan 21, 2025
@penalosa penalosa linked a pull request Jan 27, 2025 that will close this issue
9 tasks
@edmundhung edmundhung removed this from workers-sdk Jan 27, 2025
@Cherry
Copy link
Contributor

Cherry commented Jan 31, 2025

Related: #7458

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vitest Relating to the Workers Vitest integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants