mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-02 20:30:10 +00:00
31bca0052f
Introduces 'series' and 'seriesPart' fields to the Audiobook model and database schema. Updates API routes, file organization, and path template utilities to support series metadata. Enhances chapter merging logic, improves notification backend testing, and expands test coverage for admin and API routes.
1.3 KiB
1.3 KiB
Testing
Status: ƒ?3 In Progress | Backend + frontend unit testing framework (Vitest)
Overview
Backend unit tests (Node) and frontend component tests (jsdom) with isolated mocks and deterministic helpers.
Key Details
- Runner: Vitest (
vitest.config.ts) - Environments: Node for
*.test.ts, jsdom for*.test.tsxviaenvironmentMatchGlobs - Setup:
tests/setup.tssetsNODE_ENV=test,TZ=UTC, jest-dom, DOM polyfills, Next.jsLink/Imagemocks - Frontend helpers:
tests/helpers/render.tsx,tests/helpers/mock-auth.ts,tests/helpers/mock-next-navigation.ts - Backend helpers:
tests/helpers/prisma.ts,tests/helpers/job-queue.ts - GitHub Actions: Manual workflow
.github/workflows/manual-tests.ymlrunsnpm test - Coverage:
npm run test:coverage(reports incoverage/) - Scope: Unit tests only; no real network or services
API/Interfaces
npm run test
npm run test:watch
npm run test:coverage
Critical Issues
- Frontend coverage not yet enforced; expand component/page tests before adding coverage gates.