Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Angular
  3. ts-jest

ts-jest

MITTypeScriptv29.4.12

A Jest transformer with source map support for testing TypeScript projects.

Visit WebsiteGitHubGitHub
7.1k stars476 forks0 contributors

What is ts-jest?

ts-jest is a Jest transformer that allows developers to test TypeScript code using the Jest testing framework. It compiles TypeScript on-the-fly during test execution, supports source maps for debugging, and can perform type-checking to catch errors early in the development process.

Target Audience

TypeScript developers who use Jest for testing and need seamless integration between their TypeScript codebase and Jest's testing capabilities.

Value Proposition

Developers choose ts-jest because it provides a straightforward way to test TypeScript projects with full language support, eliminating the need for separate compilation steps and ensuring tests reflect the actual runtime behavior of their TypeScript code.

Overview

A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript.

Use Cases

Best For

  • Testing TypeScript applications with Jest without pre-compilation
  • Debugging TypeScript tests with accurate source map support
  • Enforcing type safety during test execution in CI/CD pipelines
  • Migrating JavaScript projects to TypeScript while maintaining existing Jest tests
  • Integrating TypeScript type-checking into the test feedback loop
  • Setting up testing environments for TypeScript libraries and frameworks

Not Ideal For

  • Projects using Babel with preset-typescript for compilation, as ts-jest adds redundant transformation steps
  • Teams employing testing frameworks other than Jest, such as Mocha or Vitest
  • Applications where test execution speed is critical and the overhead of on-the-fly TypeScript compilation is unacceptable

Pros & Cons

Pros

Full TypeScript Support

Handles all TypeScript features including type-checking during test execution, as emphasized in the README's key features, ensuring comprehensive language compatibility.

Source Map Integration

Enables accurate debugging by mapping errors back to original TypeScript source code, making troubleshooting straightforward, a highlighted benefit in the documentation.

Jest Ecosystem Compatibility

Integrates directly with Jest's configuration and workflow, providing a seamless experience for TypeScript projects, as noted in the features list.

Cons

No Semantic Versioning

Versioning follows Jest's major numbers rather than SemVer, leading to potential breaking changes without clear indicators, as warned in the README banner.

Configuration Complexity

While aiming for zero-configuration, advanced use cases require deep configurability, which can be tricky to set up and debug, as implied by the troubleshooting links.

Performance Overhead

On-the-fly TypeScript compilation adds latency to test runs, which might slow down development in large projects, despite caching optimizations mentioned.

Frequently Asked Questions

Quick Stats

Stars7,075
Forks476
Contributors0
Open Issues71
Last commit16 hours ago
CreatedSince 2016

Tags

#transformer#javascript-testing#test-runner#unit-testing#typescript#testing#type-checking#source-maps#jest

Built With

T
TypeScript
J
Jest

Links & Resources

Website

Included in

Angular10.0k
Auto-fetched 4 hours ago

Related Projects

jest-previewjest-preview

Debug your Jest tests. Effortlessly.🛠🖼

Stars2,394
Forks81
Last commit2 months ago
jest-preset-angularjest-preset-angular

Jest configuration preset for Angular projects.

Stars919
Forks304
Last commit9 hours ago
jest-codemodsjest-codemods

Codemods for migrating to Jest https://github.com/facebook/jest 👾

Stars888
Forks81
Last commit1 day ago
jest-marblesjest-marbles

Helpers library for marbles testing with Jest

Stars114
Forks15
Last commit3 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub