Whetstone

Testing & Quality

What a test is for and which kind to write, then the mechanics with Vitest 4 and Playwright 1.64: the anatomy of a test and the async mistakes that make one pass without checking anything, stubs, spies, mocks and fakes, designing code so it can be tested (including the real rule behind "you can't use enums in tests"), configuring Vitest, and end-to-end tests that don't flake.

  1. 1. What a test is for

    Lesson · Intro · ~20 min
    • Test Strategy
    • Code Coverage
  2. 2. Kinds of tests and what each one catches

    Lesson · Intro · ~25 min
    • Test Strategy
    • End-to-End Testing
  3. 3. Anatomy of a test: structure, matchers, async

    Lesson · Core · ~30 min
    • Async & Timing
    • Assertions & Matchers
    • Vitest
  4. 4. Test doubles: stubs, spies, mocks and fakes in Vitest

    Full · Core · ~40 min
    • Test Doubles
    • Vitest
    • Timers
  5. 5. Designing code you can test

    Full · Advanced · ~40 min
    • TypeScript
    • Test Doubles
    • Testability
  6. 6. Vitest 4 in practice: config, environments, coverage, output

    Lesson · Core · ~30 min
    • Vitest
    • Code Coverage
  7. 7. Playwright end-to-end tests that don't flake

    Lesson · Advanced · ~40 min
    • End-to-End Testing
    • Playwright