# Unit Test Execution ## Run the unit tests ```bash cd web pnpm test # vitest run --coverage ``` - **Expected**: 134 files and 1414 tests pass; the coverage thresholds hold (including 100% for `src/lib`, which the two new helpers meet). - **Seed**: fast-check prints `fast-check seed: ` at the top of every run. To replay a failure: `FC_SEED= pnpm test` (PBT-08). - **Reports**: coverage in `web/coverage`. ## Tests of this feature | Area | Files | |---|---| | Section heading | `src/components/SectionHeading/SectionHeading.test.tsx` (uppercase and letter-spacing in CSS only; plain `sectionTitle` headings untouched) | | Helpers | `src/lib/normalizeImagePosition.test.ts` and `slideCounter.test.ts` (examples plus properties), `visibleTestimonials.test.ts` (new property) | | Components | `Testimonials.test.tsx` (no dots, counter, no timer, wiring of arrows, keys and reduced motion, prerendered HTML), `TestimonialSlide.test.tsx` (card, crop, no quotation mark) | Property tests and example tests sit side by side (PBT-10). jsdom has no layout, so swiping, sliding and the geometry are checked in a real browser (see e2e-test-instructions.md). ## If a test fails 1. Read the output; for a property failure the shrunk counterexample and the seed are printed. 2. Replay with `FC_SEED= pnpm exec vitest run `. 3. Fix the code (or, if the property was wrong, the property) and add the shrunk case as a permanent example test.