We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When writing tests usually you have some setup logic in the beforeEach that you want to run for each test,
For example, in this test i want each test to provide a different width, height to the url
beforeEach((context) => { jsdom = new JSDOM( html` <!DOCTYPE html> <html> <body> <div id="root"></div> </body> </html> `, { url: `http://localhost:3000/launch-button.html?width=${context.width }&height=${context.height}`, }, );
If it could be possible to do something like this:
it.extend({ width: 200, height: 200 })( 'when height & width are big should render with large class', async () => { ... });
That the beforeEach context will contain the context from the it.extend
beforeEach
it.extend
No response
The text was updated successfully, but these errors were encountered:
Vitest will start passing down context from it.extend in the next version #4065
Sorry, something went wrong.
No branches or pull requests
Clear and concise description of the problem
When writing tests usually you have some setup logic in the beforeEach that you want to run for each test,
For example, in this test i want each test to provide a different width, height to the url
Suggested solution
If it could be possible to do something like this:
That the
beforeEach
context will contain the context from theit.extend
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: