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);
});

Explanation

Context can be extended with test.extend - fixtures, similar to Playwright.

Further reading

Problem with a question

Testing · Senior · question 32

Test yourself

Take the Testing · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz