Question · Vibe coding with Claude Code course · Module 13: Twitch clone

Quiz: what caught onKeyPress

The chat version with onKeyPress passed npm run lint and npx tsc --noEmit. What caught it?

Answer options

  • A component test that sends a message with a keyDown event with the Enter key and looks for it in the list
  • npm run build, which rejects deprecated events
  • The browser console, which reports an error at every key press
  • Nothing, because onKeyPress and onKeyDown work identically in tests

You can check the correct answer by solving this task in the CodeWorlds game.