Testing · Middle · Question 33 of 75

What is wrong with calling cleanup manually in afterEach?

Explanation

Manual cleanup is only needed when globals are disabled (Vitest globals: false) - then register it in setup once.

Further reading

Problem with a question

Testing · Middle · question 33

Test yourself

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

Take this quiz