# kulshekhar/ts-jest

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/kulshekhar-ts-jest).**

7,077 stars · 474 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/kulshekhar/ts-jest
- Homepage: https://kulshekhar.github.io/ts-jest
- awesome-repositories: https://awesome-repositories.com/repository/kulshekhar-ts-jest.md

## Description

ts-jest is a TypeScript compilation tool and transformer that enables the Jest testing framework to execute tests written in TypeScript. It functions as a bridge that transpiles typed source code into executable JavaScript while maintaining the necessary integration for test runner execution.

The project distinguishes itself by providing on-the-fly type diagnostics and pre-test type validation to identify structural errors before the execution phase. It includes a source map handler that links compiled JavaScript output back to the original TypeScript source lines to ensure accurate error stack traces during debugging.

The tool covers broader capabilities including ECMAScript Modules support, module path resolution for translating aliases, and integration with Babel for additional transformations. It also provides utilities for maintaining type safety within mocked functions and modules.

## Tags

### Programming Languages & Runtimes

- [TypeScript Transpilers](https://awesome-repositories.com/f/programming-languages-runtimes/compiler-interpreter-internals/compiler-toolchains/typescript-transpilers.md) — Transpiles TypeScript source code into executable JavaScript for consumption by the Jest test runner.
- [Test Execution](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/interoperability/typescript-execution/test-execution.md) — Enables the execution of Jest test suites written in TypeScript with full type support and source mapping. ([source](https://github.com/kulshekhar/ts-jest/blob/main/tsconfig.base.json))
- [Module Resolution](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/module-management/module-resolution.md) — Maps module identifiers and path aliases to specific file paths so the test runner can locate files. ([source](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md))
- [TypeScript Code Transformations](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/interoperability/typescript-execution/typescript-code-transformations.md) — Transpiles TypeScript source code into executable JavaScript to enable Jest to run typed tests. ([source](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md))
- [ECMAScript Module Support](https://awesome-repositories.com/f/programming-languages-runtimes/ecmascript-module-support.md) — Processes ECMAScript Modules output and configuration for both isolated and non-isolated module compilation. ([source](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md))
- [Isolated Module Compilation](https://awesome-repositories.com/f/programming-languages-runtimes/isolated-module-compilation.md) — Processes files as independent units to speed up transpilation by skipping cross-file type analysis.
- [Babel Transformations](https://awesome-repositories.com/f/programming-languages-runtimes/multi-pass-compiler-pipelines/babel-transformations.md) — Passes transpiled code through a secondary Babel compiler to apply environment polyfills and additional transformations.

### Part of an Awesome List

- [On-the-Fly Type Diagnostics](https://awesome-repositories.com/f/awesome-lists/devtools/beyond-the-dom/on-the-fly-type-diagnostics.md) — Executes type checking during the test run to identify structural errors before the JavaScript execution phase.
- [Pre-test Type Validation](https://awesome-repositories.com/f/awesome-lists/devtools/testing-and-validation/type-accuracy-validation/pre-test-type-validation.md) — Performs on-the-fly type diagnostics and pre-test validation to identify structural errors before tests run. ([source](https://kulshekhar.github.io/ts-jest/docs/babel7-or-ts))
- [Component Testing](https://awesome-repositories.com/f/awesome-lists/devtools/component-testing.md) — TypeScript transformer for Jest.
- [Testing Tools](https://awesome-repositories.com/f/awesome-lists/devtools/testing-tools.md) — Enables TypeScript support for Jest testing.

### DevOps & Infrastructure

- [TypeScript Compilation Utilities](https://awesome-repositories.com/f/devops-infrastructure/cicd-pipeline-automation/core-build-engines/build-tooling/code-transformation-engines/typescript-compilation-utilities.md) — Converts typed source code into executable JavaScript while maintaining link references to original files.

### Software Engineering & Architecture

- [Static Type Checking](https://awesome-repositories.com/f/software-engineering-architecture/typescript-type-definitions/static-type-checking.md) — Performs static analysis to verify type consistency across the codebase during the test process.
- [Source Map Resolution](https://awesome-repositories.com/f/software-engineering-architecture/stacks/stack-trace-formatters/source-map-resolution.md) — Resolves compiled JavaScript stack frames back to original TypeScript source lines using source maps.

### Testing & Quality Assurance

- [TypeScript Support](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/test-frameworks/execution-and-infrastructure/test-execution-runners/typescript-support.md) — Provides the necessary TypeScript integration to execute Jest test suites on typed source code.
- [Babel Integration](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/test-frameworks/test-levels-and-types/integration-testing-suites/test-suite-integrations/jest-presets/babel-integration.md) — Integrates with Babel to process code through a transformer and compiler for additional JavaScript transformations. ([source](https://kulshekhar.github.io/ts-jest))

### Development Tools & Productivity

- [JavaScript and TypeScript Debugging](https://awesome-repositories.com/f/development-tools-productivity/debugging-profiling-testing/debugging-diagnostics/javascript-and-typescript-debugging.md) — Enables a debugging workflow by linking compiled JavaScript output back to original TypeScript source files.
- [Source Map Generators](https://awesome-repositories.com/f/development-tools-productivity/source-map-generators.md) — Provides source maps that link compiled JavaScript output back to the original TypeScript source lines for accurate debugging. ([source](https://github.com/kulshekhar/ts-jest#readme))
