About this project
ts-jest is a Jest transformer that enables seamless testing of TypeScript projects. It compiles TypeScript files on the fly, preserving source maps so that stack traces point to the original TypeScript source. The transformer also runs the TypeScript type checker, ensuring that type errors are caught during the test run.
Key features:
- Full TypeScript compatibility, supporting versions 4.3 through 6 (and side‑by‑side setup for TypeScript 7).
- Source‑map support for accurate error reporting.
- Integrated type‑checking during test execution.
- Easy configuration via the command `npx ts-jest config:init` (or the Yarn equivalent).
- Works with Jest's standard workflow; no extra test runner needed.
- Comprehensive online documentation, troubleshooting guide, and community support via Discord and GitHub Discussions.
Getting started:
1. Install Jest and TypeScript as dev dependencies.
2. Install ts-jest and the Jest type definitions.
3. Initialise a ts-jest configuration with `npx ts-jest config:init`.
4. Run tests using `npm test` or `npx jest` (or the Yarn equivalents).
The project is built with TypeScript and Jest, and the ts-jest package itself is tested using ts-jest, demonstrating its self‑hosting capability. Contributions are welcomed; guidelines are provided in CONTRIBUTING.md, and the repository follows an open‑source MIT license.
For detailed usage instructions, configuration options, and advanced guides, refer to the online documentation at https://kulshekhar.github.io/ts-jest. The project does not follow strict semantic versioning; major version numbers align with the corresponding Jest version.
Maintained by Kulshekhar Kabra and contributors, ts-jest is supported by JetBrains through an open‑source license.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.