Registry / testing / jest-ts

jest-ts

JSON →
library1.1.22jsnpmunverified

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.

npm install jest-ts
INSTALL
IMPORT
SIG · JEST-TS
J
jest-ts
testingjavascriptv1.1.22
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

jest-ts/jest-preset
preset: 'jest-ts/jest-preset' // in jest.config.js
preset: 'jest-ts' // Missing /jest-preset path
The preset must be referenced as 'jest-ts/jest-preset', not just 'jest-ts'.
globals['jest-ts']
globals: { 'jest-ts': { typeCheck: true } } // in jest.config.js
globals: { jest-ts: { typeCheck: true } } // Without quotes, Jest may interpret as object key
In JavaScript config, the key must be a string literal 'jest-ts' to avoid interpretation as a nested object.
init command
npx jest-ts init
npm init jest-ts // Incorrect command
Use npx jest-ts init to run the initialization CLI tool.

Install jest-ts, run one-click init to generate config and example test, then run tests.

npm install jest-ts jest typescript --save-dev npx jest-ts init # Respond to prompts (e.g., overwrite files) npm install npm test # Expected output: Test Suites: 1 passed, 1 total
jest-ts --version
Debug
Known issues
breakingjest-ts requires jest >= 28.0.0 and typescript >= 5.0.0. Using older versions will cause errors.
fix
Upgrade jest to v28+ and TypeScript to v5+.
affects: >=1.0.0
breakingNode.js version must be >=16.0.0 due to esbuild dependency.
fix
Use Node.js 16+ (currently LTS).
affects: >=1.0.0
deprecatedThe 'jest-ts' preset path is 'jest-ts/jest-preset', not a simple 'jest-ts'.
fix
Use preset: 'jest-ts/jest-preset' in Jest config.
affects: >=1.0.0
gotchaThe globals key must be quoted: 'jest-ts' (string).
fix
Write globals: { 'jest-ts': { ... } } in JavaScript config.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'jest-ts/jest-preset' from 'jest.config.js'
Preset path is incorrect or jest-ts not installed.
fix
Ensure jest-ts is installed: npm install jest-ts --save-dev. Verify preset: 'jest-ts/jest-preset'.
Error: Jest: 'jest-ts' preset not found. Did you mean to use 'jest-ts/jest-preset'?
Using preset: 'jest-ts' instead of 'jest-ts/jest-preset'.
fix
Change preset to 'jest-ts/jest-preset'.
TypeError: jest_ts_1.default is not a function
Incorrect import or CommonJS/ESM mismatch when using jest-ts transformer directly.
fix
Do not import jest-ts directly; use the preset in Jest config.
Upgrade
Version history
1.1.22latest on npm
Audit
Dependencies
jestrequiredCore peer dependency; jest-ts is a Jest transformer and preset.
typescriptrequiredRequired for type checking and TypeScript compilation; peer dependency.
esbuildrequiredUnderlying transpiler used for fast TypeScript to JavaScript conversion.
Agent activity
2 hits · last 30 days
node
2
Resources
jest-ts — npm install jest-ts · libregistry