What problem does it solve? Tests that mock internal collaborators, assert error message text, or recompute expected values the same way the implementation does break on every refactor and pass even when the code is wrong. This Skill codifies how to write Vitest tests that assert behavior through stable interfaces so they survive refactoring and actually catch bugs. ## Core Features & Use Cases - Interface-driven testing: Drive handler factories with real Request objects, render synchronous Server Components under jsdom with Testing Library, and run a shared LlmPort contract suite once per adapter. - Fakes over mocks: Replace real sleeps with vi.useFakeTimers, isolate filesystem tests in mkdtempSync temp directories, and prefer in-memory fakes like createFakeLlmPort over mocks of internal collaborators. - Rigorous assertions: Assert error classes and stable code fields instead of messages, source expected values from outside the implementation, and sweep edge cases with labelled it.each tables closed by as const satisfies. - Use Case: When fixing a bug in a Next.js route handler, write a regression test that builds a new Request, injects a fake port, and asserts the response status and JSON body β without mocking anything internal. ## Quick Start Ask the AI to write a Vitest test for a specific handler, page, or adapter following the writing-tests conventions for naming, fakes, and assertions.