Question · Vibe coding with Claude Code course · Module 11: Spotify clone
Test kit for components
What does a Next.js project need for Vitest to run a component test, such as the queue test?
Answer options
- Only the vitest package, because it understands JSX by itself and has a built-in browser
- Vitest, @vitejs/plugin-react, jsdom and Testing Library, plus vitest.config.mts with the jsdom environment
- The react-test-renderer package and a next test script in package.json
- ESLint with React rules, because it is what runs component tests
You can check the correct answer by solving this task in the CodeWorlds game.