tj

ts-jest

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

Showing:

Popularity

Downloads/wk

5.6M

GitHub Stars

5.4K

Maintenance

Last Commit

1mo ago

Contributors

153

Package

Dependencies

8

License

MIT

Type Definitions

Built-In

Tree-Shakeable

No?

Reviews

Average Rating

4.0/58
Read All Reviews
karolis-sh
sayak-sarkar

Top Feedback

6Hard to Use
2Great Documentation
2Poor Documentation
1Easy to Use
1Performant
1Highly Customizable

Readme

ts-jest

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

NPM version NPM downloads Known vulnerabilities Coverage status GitHub actions GitHub license

It supports all features of TypeScript including type-checking. Read more about Babel7 + preset-typescript vs TypeScript (and ts-jest).


We are not doing semantic versioning and 23.10 is a re-write, run npm i -D ts-jest@"<23.10.0" to go back to the previous version

View the online documentation (usage & technical)

Ask for some help in the Jest Discord community or ts-jest GitHub Discussion

Before reporting any issues, be sure to check the troubleshooting page

We're looking for collaborators! Want to help improve ts-jest?


Getting Started

These instructions will get you setup to use ts-jest in your project. For more detailed documentation, please check online documentation.

using npmusing yarn
Prerequisitesnpm i -D jest typescriptyarn add --dev jest typescript
Installingnpm i -D ts-jest @types/jestyarn add --dev ts-jest @types/jest
Creating confignpx ts-jest config:inityarn ts-jest config:init
Running testsnpm t or npx jestyarn test or yarn jest

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We DO NOT use SemVer for versioning. Though you can think about SemVer when reading our version, except our major number follows the one of Jest. For the versions available, see the tags on this repository.

Authors/maintainers

See also the list of contributors who participated in this project.

Supporters

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Rate & Review

Great Documentation2
Easy to Use1
Performant1
Highly Customizable1
Bleeding Edge0
Responsive Maintainers0
Poor Documentation2
Hard to Use6
Slow1
Buggy0
Abandoned0
Unwelcoming Community0
100
Karolis ŠarapnickisVilnius, Lithuania86 Ratings79 Reviews
December 29, 2020
Hard to Use

This package adds the ability to run Jest tests written in TypeScript. It is widely used and actively maintained. It also supports a mix of both TypeScript + JavaScript written tests, but from my experience, it is tough to do this right - it turns out either not performant or you'll need to add some babel plugins for stuff to start working. My suggestion would either your all tests should pure JavaScript (no need for this package) or all TypeScript - then you'll have the easiest setup.


0
Sayak SarkarPune, India196 Ratings109 Reviews
Principal Software Engineer at Red Hat, open web evangelist and a friendly developer.
4 months ago
Hard to Use
Poor Documentation
Slow
Highly Customizable

ts-jest allows developers the convenience of running Jest tests that have been written in TypeScript. Additionally, it's support of hybrid ts/js test implementations is also quite awesome. However, due to the inherent pre compilation related woes that it tackles internally, the performance takes a bit of a hit. The documentation for this module also needs to be improved a bit to make it easier for developers to understand it's usage and debug any issues.


0
cherryblossom000Earth, Solar System, Milky Way, Universe27 Ratings28 Reviews
I’m a human that lives on Earth.
1 month ago
Great Documentation
Hard to Use
Ginni Tsukino15 Ratings2 Reviews
4 months ago
Great Documentation
Hard to Use
Jakob KruseGermany // NRW6 Ratings0 Reviews
what about no
5 months ago

Alternatives

mocha☕️ simple, flexible, fun javascript test framework for node.js & the browser
User Rating
4.6/ 5
108
Top Feedback
34Easy to Use
33Great Documentation
27Performant
GitHub Stars
21K
Weekly Downloads
5M
avaNode.js test runner that lets you develop with confidence 🚀
User Rating
4.5/ 5
20
Top Feedback
2Performant
1Great Documentation
1Bleeding Edge
GitHub Stars
19K
Weekly Downloads
217K
uvu
uvuuvu is an extremely fast and lightweight test runner for Node.js and the browser
User Rating
5.0/ 5
2
Top Feedback
1Easy to Use
1Performant
1Responsive Maintainers
GitHub Stars
2K
Weekly Downloads
371K
karma-chrome-launcherA Karma plugin. Launcher for Chrome and Chrome Canary.
User Rating
3.5/ 5
2
Top Feedback
2Great Documentation
1Easy to Use
GitHub Stars
451
Weekly Downloads
2M
jap
japaEmbedable test runner for Node.js
User RatingN/A
Top Feedback
N/A
GitHub Stars
257
Weekly Downloads
5K
See 13 Alternatives

Tutorials

No tutorials found
Add a tutorial