question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🚀 Feature Proposal

Make jest small again (less than 30 MB)

Motivation

It appears jest is the largest when comparing other test harnesses.

jest@0.1.40 was small…it looks like jest@12.1.0 is when the size exploded. Now jest@23.0.0 is even larger.

Example

package install size
tap@12.0.1 install size
ava@0.25.0 install size
mocha@5.2.0 install size
tape@4.9.0 install size
jasmine@3.1.0 install size
jest@0.1.40 install size
jest@12.1.0 install size
jest@23.0.0 install size
jest@23.0.1 install size

Click a badge above to see a history of the install size.

Pitch

Every repo needs to install jest to run it’s own tests.

One repo with 50 MB is maybe not too bad but your app is split into 200 microservices, that’s 10 GB of jest!

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:74
  • Comments:71 (22 by maintainers)

github_iconTop GitHub Comments

12reactions
TrySoundcommented, Jun 1, 2021

Removing jsdom in jest 28 will cut another 10 https://packagephobia.com/result?p=jsdom

11reactions
wopiancommented, Jun 1, 2021

Jest 27 has knocked off a further ~10 MB compared to 26 🎉

package install size
jest@26.6.3 install size
jest@27.0.0 install size
Read more comments on GitHub >

github_iconTop Results From Across the Web

Jest · Delightful JavaScript Testing
Jest aims to work out of the box, config free, on most JavaScript projects. Snapshots. Make tests which keep track of large objects...
Read more >
Make Your Jest Tests up to 20% Faster by Changing a Single ...
When you have Jest as your test runner, passing the --maxWorkers=50% option will make the tests faster in most cases.
Read more >
Jest Tutorial for Beginners: Getting Started With JavaScript ...
Time to create your first Jest test. Open up filterByTerm.spec.js and create a test block: describe("Filter function" ...
Read more >
Jest Testing Tutorial: 5 Easy Steps - Testim Blog
Unit tests verify the smallest parts of your application in complete ... You can simply create a snapshot and Jest will do the...
Read more >
Two useful ways to easily run a single test using Jest
To make it run a single test with Jest having more specific control, ... It will also show the same output as above...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found