project-forms / project-forms.github.io

Forms for GitHub Projects
https://project-forms.github.io/
ISC License
1 stars 0 forks source link

add vitest watch mode to package.json #43

Closed oscard0m closed 9 months ago

oscard0m commented 9 months ago

📘 Description

📖 Context

In local development, it's interesting to run vitest in watch mode (the default when running vitest CLI). One advantage I see is to update generated snapshots when they change or become obsolete.

vitest relies on process.env.CI to run in watch mode or not^1.

netlify[bot] commented 9 months ago

Deploy Preview for project-forms ready!

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

oscard0m commented 9 months ago

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).

oscard0m commented 9 months ago

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.

project-form-releaser[bot] commented 9 months ago

:tada: This PR is included in version 1.1.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: