React 18 dev replays a failed render through a fake DOM event; jsdom reports it as an uncaught window error and vitest forwards it to an uncaughtException, which no console.error spy can catch. A window error listener that prevents the default keeps the deliberate throw inside the test, alongside the spy silencing React's own boundary message.