Testing · Middle · Question 33 of 75
What is wrong with calling cleanup manually in afterEach?
- ✓Correct answer: Calling
cleanupmanually is unnecessary - RTL does it automatically with Jest/Vitest globals - 2
cleanupdoesn't exist - 3
cleanupmust run beforerender
Explanation
Manual cleanup is only needed when globals are disabled (Vitest globals: false) - then register it in setup once.