Records the build and test results (full suite, integration scenarios, Lighthouse in CI and locally) and completes the feature. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.1 KiB
1.1 KiB
Unit Test Execution — Portfolio Page
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 newportfolioFilters,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