-
Notifications
You must be signed in to change notification settings - Fork 10k
[vitest-integration] Improve the messaging around why we recommend vitest #19995
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
Conversation
| import { DirectoryListing } from "~/components" | ||
|
|
||
| For most users, Cloudflare recommends using the Workers Vitest integration for testing Workers and [Pages Functions](/pages/functions/) projects. [Vitest](https://vitest.dev/) is a popular JavaScript testing framework featuring a very fast watch mode, Jest compatibility, and out-of-the-box support for TypeScript. In this integration, Cloudflare provides a custom pool that allows your Vitest tests to run *inside* the Workers runtime. | ||
| Testing Workers and Pages Functions within our Workers runtime can be challenging and requires additional manual setup. To address this, Cloudflare offers the Workers Vitest integration, which streamlines the process by providing a custom pool that lets your tests run directly inside the Workers runtime using [Vitest](https://vitest.dev/). Vitest is a modern JavaScript testing framework with a wide range of features such as an instant watch mode, snapshot testing, code coverage, built-in TypeScript support and seamless Jest compatibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"requires additional manual setup"
Additional compared to what?
src/content/docs/workers/testing/vitest-integration/get-started/index.mdx
Outdated
Show resolved
Hide resolved
|
Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment. We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally. PR Change SummaryImproved messaging around the recommendation of the Vitest integration for testing Workers, clarifying its benefits and setup process.
Modified Files
How can I customize these reviews?Check out the Hyperlint AI Reviewer docs for more information on how to customize the review. If you just want to ignore it on this PR, you can add the Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add |
|
Hi @edmundhung - This has merge conflicts and it says that they're too complex to resolve in the web editor. It would probably just be easiest to create a new PR? Let me know if you'd like me to do that for you and close this one. |
|
Closing out as this section has changed considerably (and seems much clearer overall now). If desired, you could do a new PR against https://developers.cloudflare.com/workers/testing/vitest-integration/, where an amended version of the original description lives. |
Summary
It wasn't clear enough to people why we recommend Vitest and what
vitest-pool-workersresolves. Hopefully this will improve the messaging around it.Screenshots (optional)
Documentation checklist