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]: Add rule when using .concurrent and snapshots #311

Closed
Haberkamp opened this issue Dec 5, 2023 · 1 comment · Fixed by #315
Closed

[Feature Request]: Add rule when using .concurrent and snapshots #311

Haberkamp opened this issue Dec 5, 2023 · 1 comment · Fixed by #315

Comments

@Haberkamp
Copy link
Contributor

To run snapshot tests in parallel you must use the local Test Context. See: https://vitest.dev/api/#test-concurrent

Vitest already warns us about that once we write execute the test. (Error: Snapshot cannot be used outside of test). The error message does not tell the developer how to fix the issue. Adding a new lining rule will improve the developer experience for that scenario.

I'd be willing to contribute a PR for this issue.

@veritem
Copy link
Member

veritem commented Dec 5, 2023

a pr is welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants