-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
rename dev script, update contributor guide and readme #9673
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
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| 1. Tests suites like `css`, `js`, `server-side-rendering` asserts that the generated output has to match the content in the `.expected` file. For example, in the `js` test suites, the generated js code is compared against the content in `expected.js`. | ||
| 1. To update the content of the `.expected` file, run the test with `--update` flag. (`pnpm test --update`) | ||
| 1. Tests suites like `snapshot` and `parser` assert that the generated output matches the existing snapshot. | ||
| 1. To update these snapshots, run `UPDATE_SNAPSHOTS=true pnpm test`. |
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.
Can we just do pnpm run test -u? I just delegate to vitest that way in enhanced-img, but not sure if there's a special reason why that won't work here
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.
No, this is using a completely different mechanism. I have no idea how Vitest snapshots work. If it makes sense for us to use them then we can, though it'd be a different PR
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.
ok i just read the vitest snapshot docs and yeah, i don't think it's appropriate for our snapshot tests. it would make life harder
follow-up to #9671. a lot of this stuff is horribly out of date. it also doesn't make sense to have incomplete developing/testing instructions in the readme, that stuff belongs in the contributor guide
this also changes
pnpm watchtopnpm dev