mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-02 20:30:10 +00:00
94dbaf073b
Introduced a Vitest-based backend unit testing framework with supporting scripts, helpers, and GitHub Actions integration. Refactored the admin settings page to a modular architecture, splitting monolithic logic into feature-specific tabs and hooks for improved maintainability and testability. Updated documentation to reflect the new testing setup and settings architecture, and added new dependencies for testing utilities.
948 B
948 B
Testing
Status: ⏳ In Progress | Backend unit testing framework (Vitest)
Overview
Unit tests for backend logic with isolated mocks (Prisma, integrations, queue).
Key Details
- Runner: Vitest (
vitest.config.ts, Node environment) - Setup:
tests/setup.tssetsNODE_ENV=test,TZ=UTC, blocks unmocked fetch - 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: Backend unit tests only; no real network or services
API/Interfaces
npm run test
npm run test:watch
npm run test:coverage
Critical Issues
- API route unit tests are incomplete; add route-level mocks before enforcing coverage.