Testing · Senior · Question 32 of 75
What is the test context in Vitest and why is it useful for concurrent tests?
test.concurrent("a", async ({ expect }) => {
expect(await load()).toBe(1);
});- ✓Correct answer: Each test receives its own context; with
concurrent, the localexpectties snapshots and assertions to the right test - 2It's a React context provider
- 3It shares state between all tests
Explanation
Context can be extended with test.extend - fixtures, similar to Playwright.