Closed oscard0m closed 9 months ago
Name | Link |
---|---|
Latest commit | 2e5c6b9a1b060b22f486b8a644dea2fc1b4fdf1e |
Latest deploy log | https://app.netlify.com/sites/project-forms/deploys/65ca4f6125786f0008582af7 |
Deploy Preview | https://deploy-preview-43--project-forms.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
nice! I wonder if we should watch by default though? Maybe add a new script
test:watch
instead? I'm okay either way
I personally like watch mode as default. With the optimizations they offer in place, it's quite optimized the watch mode.
Here's an explanation of vitest
philosophy on using watch mode
as the default in development^1:
Watch mode is enabled by default, aligning itself with the way Vite pushes for a dev first experience. Even with all these improvements in DX, Vitest stays lightweight by carefully choosing its dependencies (or directly inlining needed pieces).
In the end, I changed this PR to use vitest
for CI and local development. vitest
relies on process.env.CI
to run in watch mode or not^1.
:tada: This PR is included in version 1.1.3 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
📘 Description
npm test
runsvitest
in watch mode when it's not CI mode.test
command in.workflows/test.yml
: ~npm run test
~npm test
📖 Context
In local development, it's interesting to run
vitest
in watch mode (the default when runningvitest CLI
). One advantage I see is to update generated snapshots when they change or become obsolete.vitest
relies onprocess.env.CI
to run in watch mode or not^1.