Testing · Junior · Question 29 of 78

Which environment do component tests usually run in under Jest/Vitest?

Explanation

In Vitest it is set with environment: "jsdom"; in Jest - testEnvironment: "jsdom". The emulation has no real layout or rendering.

Further reading

Problem with a question

Testing · Junior · question 29

Test yourself

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

Take this quiz