{"id":25785,"library":"jest-ts","title":"jest-ts - Fast Jest TypeScript Transpiler","description":"jest-ts is a high-performance Jest TypeScript transpiler powered by esbuild, offering 5-10x faster transpilation than ts-jest. Version 1.1.22 is the latest stable with a monthly release cadence. Key differentiators include intelligent caching based on code content, config, and package versions; on-demand type checking using the official TypeScript API that does not block test execution; and a one-click init command (npx jest-ts init) that generates config files, example code, and npm scripts. Supports Node.js and browser (jsdom) environments, and both CommonJS and ES modules. Requires jest >= 28.0.0 and TypeScript >= 5.0.0.","status":"active","version":"1.1.22","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","jest","typescript","esbuild","transpiler","test","jest-transform","fast"],"install":[{"cmd":"npm install jest-ts","lang":"bash","label":"npm"},{"cmd":"yarn add jest-ts","lang":"bash","label":"yarn"},{"cmd":"pnpm add jest-ts","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core peer dependency; jest-ts is a Jest transformer and preset.","package":"jest","optional":false},{"reason":"Required for type checking and TypeScript compilation; peer dependency.","package":"typescript","optional":false},{"reason":"Underlying transpiler used for fast TypeScript to JavaScript conversion.","package":"esbuild","optional":false}],"imports":[{"note":"The preset must be referenced as 'jest-ts/jest-preset', not just 'jest-ts'.","wrong":"preset: 'jest-ts' // Missing /jest-preset path","symbol":"jest-ts/jest-preset","correct":"preset: 'jest-ts/jest-preset' // in jest.config.js"},{"note":"In JavaScript config, the key must be a string literal 'jest-ts' to avoid interpretation as a nested object.","wrong":"globals: { jest-ts: { typeCheck: true } } // Without quotes, Jest may interpret as object key","symbol":"globals['jest-ts']","correct":"globals: { 'jest-ts': { typeCheck: true } } // in jest.config.js"},{"note":"Use npx jest-ts init to run the initialization CLI tool.","wrong":"npm init jest-ts // Incorrect command","symbol":"init command","correct":"npx jest-ts init"}],"quickstart":{"code":"npm install jest-ts jest typescript --save-dev\nnpx jest-ts init\n# Respond to prompts (e.g., overwrite files)\nnpm install\nnpm test\n# Expected output: Test Suites: 1 passed, 1 total","lang":"typescript","description":"Install jest-ts, run one-click init to generate config and example test, then run tests."},"warnings":[{"fix":"Upgrade jest to v28+ and TypeScript to v5+.","message":"jest-ts requires jest >= 28.0.0 and typescript >= 5.0.0. Using older versions will cause errors.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use Node.js 16+ (currently LTS).","message":"Node.js version must be >=16.0.0 due to esbuild dependency.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use preset: 'jest-ts/jest-preset' in Jest config.","message":"The 'jest-ts' preset path is 'jest-ts/jest-preset', not a simple 'jest-ts'.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Write globals: { 'jest-ts': { ... } } in JavaScript config.","message":"The globals key must be quoted: 'jest-ts' (string).","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure jest-ts is installed: npm install jest-ts --save-dev. Verify preset: 'jest-ts/jest-preset'.","cause":"Preset path is incorrect or jest-ts not installed.","error":"Cannot find module 'jest-ts/jest-preset' from 'jest.config.js'"},{"fix":"Change preset to 'jest-ts/jest-preset'.","cause":"Using preset: 'jest-ts' instead of 'jest-ts/jest-preset'.","error":"Error: Jest: 'jest-ts' preset not found. Did you mean to use 'jest-ts/jest-preset'?"},{"fix":"Do not import jest-ts directly; use the preset in Jest config.","cause":"Incorrect import or CommonJS/ESM mismatch when using jest-ts transformer directly.","error":"TypeError: jest_ts_1.default is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}