{"id":25786,"library":"jest-runner-tsc","title":"jest-runner-tsc","description":"A Jest runner for the TypeScript compiler that allows running type checking as part of the Jest test suite. Version 1.6.0 (latest, 2019) uses transpileModule for faster builds and supports custom tsconfig paths. No significant updates since 2019; library is in maintenance mode. Differentiators: integrates TypeScript compilation directly into Jest's runner pipeline, provides type errors as test failures, and supports project references via tsconfig. Alternatives: ts-jest for combined compilation and testing, or a separate tsc --noEmit step.","status":"maintenance","version":"1.6.0","language":"javascript","source_language":"en","source_url":"https://github.com/azz/jest-runner-tsc","tags":["javascript"],"install":[{"cmd":"npm install jest-runner-tsc","lang":"bash","label":"npm"},{"cmd":"yarn add jest-runner-tsc","lang":"bash","label":"yarn"},{"cmd":"pnpm add jest-runner-tsc","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is a Jest runner, not a library. It is configured via Jest's runner option, not imported directly.","wrong":"const runner = require('jest-runner-tsc')","symbol":"jest-runner-tsc","correct":"module.exports = { runner: 'jest-runner-tsc', ... }"}],"quickstart":{"code":"// jest.tsc.config.js\nmodule.exports = {\n  runner: 'jest-runner-tsc',\n  displayName: 'tsc',\n  moduleFileExtensions: ['ts', 'tsx', 'js'],\n  testMatch: ['<rootDir>/**/*.ts'],\n  // Optional: specify tsconfig path\n  // transform: { '^.+\\\\.tsx?$': 'ts-jest' }, // Not needed\n  // globalSetup: undefined,\n  // ... other Jest config\n};\n\n// package.json\n{\n  \"jest-runner-tsc\": {\n    \"tsconfigPath\": \"./tsconfig.json\"\n  }\n}\n\n// Run with: jest -c jest.tsc.config.js","lang":"javascript","description":"Configuration example showing how to use jest-runner-tsc as a Jest runner, including optional tsconfig path setting."},"warnings":[{"fix":"Ensure your testMatch glob covers all TypeScript files you want to type-check, or use tsconfig's include/files.","message":"This runner only type-checks files matching testMatch. If your tsconfig includes other files, they won't be checked unless included in testMatch.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider using ts-jest with isolatedModules or separate tsc --noEmit step.","message":"Package has not been updated since 2019. It may not work with newer Jest versions (>=27) due to changes in Jest runner API.","severity":"deprecated","affected_versions":">=1.6.0"},{"fix":"If your tsconfig is not in rootDir, set 'tsconfigPath' in jest-runner-tsc config.","message":"By default, tsconfig.json is resolved relative to the Jest rootDir (usually the project root), but you can override with tsconfigPath option.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Do not expect any compiled output; use a separate build step.","message":"The runner uses transpileModule, so it does not output any files. It only reports type errors.","severity":"gotcha","affected_versions":">=1.5.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install jest-runner-tsc as devDependency and ensure Jest can resolve it (check working directory).","cause":"jest-runner-tsc is not installed or not in Jest's module resolution path.","error":"TypeError: Jest: Got error running runner: Cannot find module 'jest-runner-tsc'"},{"fix":"Remove displayName or upgrade Jest to >=24.","cause":"Using Jest version < 24 where displayName was not supported.","error":"Configuration error: Unknown option 'displayName'"},{"fix":"Install TypeScript: npm install --save-dev typescript","cause":"TypeScript is not installed or not in node_modules.","error":"Cannot find module 'typescript'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}