What problem does it solve? Tests that acquire resources like database connections or temporary files often leak state between runs, causing flaky, order-dependent failures, and complex fixture setup buries the fields that actually matter for each test. This Skill provides the structural patterns to manage resource lifecycle and test data supply cleanly. ## Core Features & Use Cases - Four-Phase Test: Structures tests into setup, exercise, verify, and teardown phases using beforeEach/afterEach hooks, with exception-safe teardown and shuffle-based order-independence checks. - Test Data Builder / Object Mother: Builds complex fixtures via chainable with-methods that override only the fields relevant to each test, keeping default values in one place and logic out of the builder. - Use Case: When a vitest suite opens a TempStore per test and assembles user objects with many fields, apply Four-Phase Test to guarantee cleanup and a Builder like aUser().withRole("admin").build() so each test shows only the difference that drives its result. ## Quick Start Ask the AI to restructure your vitest tests using the Four-Phase Test pattern and a Test Data Builder so resources are always released and each test shows only the fields that affect its outcome.