# Unit Test Execution — Portfolio Page ```bash cd web pnpm test # vitest run with v8 coverage; fast-check seed is logged (config/testSeed.ts) ``` ## Expected - 82 test files, 460 tests, 0 failures (as of 9efa7fc) - Coverage thresholds met: 100% for `src/lib/**`, `src/seo.ts`, `src/sitemap.ts` (incl. the new `portfolioFilters`, `wrapIndex`, `swipeDirection`, `masonryRowSpan`, `neighbourIndexes`, `lightboxReducer`, `galleryImages`); overall 95.3% statements - Property-based tests (PBT-02..07): round-trip (`wrapIndex`, `shootFromSearch`), invariants, idempotence (`filterPhotos`, `wrapIndex`), oracles (`neighbourIndexes`, `shootTypesWithPhotos`, `toGalleryItems`), stateful (`lightboxReducer`); a failure prints the seed and the shrunk counterexample — rerun with that seed ## jsdom limits handled in tests (documented in the test files) - The dialog's focus trap needs layout boxes: the focus test stubs `getClientRects` - Chakra removes a closed dialog after its fade-out, which needs real animation events: tests check `data-state="closed"` and the callbacks