Repository navigation
Backend Testing
How the backend is tested. General strategy: Testing Strategy. Part of Backend Overview.
-
Jest via
ts-jest,testEnvironment: node, configapps/backend/jest.config.cjs(isolatedModules: true,diagnostics: falsefor speed). Scripts:pnpm test(jest),pnpm test:coverage. - Tests live under
apps/backend/test/(roots: ["<rootDir>/test"]), mirroringsrc/:test/routers,test/controllers,test/services(the largest three), plustest/models,middlewares,config,auth,labs,integrations,queues,utils,pdf,scripts,types, andtest/app.test.ts- ~437 test files as of 2026-08 (testMatch: **/?(*.)+(spec|test).ts).
test/jest.setup.ts (setupFilesAfterEnv) only stubs STREAM_API_KEY/STREAM_API_SECRET. The MongoDB migration scaffold this file used to neutralize — the DUAL_WRITE_*/READ_FROM_POSTGRES flags, the src/utils/dual-write mock, mongodb-memory-server, and config/db.ts — was removed with the scaffold itself in PR #1819 (merged 2026-07-18, fixes #1818); there are no MongoDB-backed tests anymore, and Prisma is mapped to the real package source.
moduleNameMapper points workspace packages at their source: @yosemite-crew/database → packages/database/src/client.ts, @yosemite-crew/lib → packages/lib/src/index.ts, other @yosemite-crew/* → packages/*/src, src/* → <rootDir>/src/*, and rewrites .js import specifiers to source.
Provider v8, output coverage/. collectCoverageFrom = src/**/*.ts with an explicit exclusion list (e.g. middlewares/auth.ts, some lab/room/invite controllers). On --coverage runs, workerIdleMemoryLimit: 512MB avoids a known V8 coverage assertion on CI. SonarCloud config at sonar-project.properties — see Code Quality Gates.
Home · Architecture · ADRs · Plans · Roadmap · Contributing · Main repo · DeepWiki · Discord
Yosemite Crew is a product of DuneXploration UG (haftungsbeschränkt). This wiki mirrors the repository; where a page and the repo disagree, the repo wins. See the Wiki Style Guide.
Product & Domain
Architecture
Applications
- Backend — Overview
- Frontend / PIMS Web — Overview
- Mobile — Overview
- Desktop PIMS Shell
- Developer Portal
- SuperAdmin
Design & Accessibility
Engineering Handbook
Decisions (ADRs)
Design Docs & Plans
Meta
Canonical code & docs: main repo · Auto-generated companion: DeepWiki