Jest Setup

Configure Jest for a TypeScript project — ts-jest, module mapping, and coverage thresholds.

alexngai 30192c1 458 B Updated

File contents

Jest Setup (TypeScript)

  1. Install jest, ts-jest, and @types/jest.
  2. jest.config.ts: set preset: 'ts-jest' and testEnvironment: 'node' (or jsdom for UI).
  3. Map path aliases with moduleNameMapper so @/x resolves like your bundler.
  4. Gate CI with coverageThreshold so coverage can't silently regress.

alexngai/skill-tree/tree/main/docs/demo/skills/jest-setup commit 30192c15fc

Frequently asked questions

npx skillmds@latest add alexngai/jest-setup