-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jest runs out of memory when producing coverage for a large file #8557
Comments
We use Istanbul to generate coverege, which works as a Babel plugin so I suppose it's mostly because of that. Not sure how much we can do currently to mitigate that. But, there's an open issue on migrating our coverage system to built-in V8 coverage: #7062 which should speed it up significantly. We'd love some help in the area. cc @bcoe |
Could we maybe write coverage data to disk as we go to free up memory, and load it back up when we're done running tests to write the reports? EDIT: Oh, it's one gigantic file. hmmm EDIT2: And I see now running it that it fails in |
@sandersn v8 coverage is out with jest 25, would love it if you could give it a whirl |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
Jest runs out of memory when producing coverage for a test file that is supposed to exercise the typescript compiler, which is 7.2 MB.
Background: I'm experimenting with switching Typescript to jest in order to get coverage-based testing. My first attempt is to create a small prototype that imitates our current tests in mocha. But it fails when I request a coverage report.
To Reproduce
Clone this repo: https://github.com/sandersn/jest-typescript-oomemory
There are only two files that matter, though:
Expected behavior
A coverage report. In my original code, I wanted to see how well Typescript's tests covered the typescript compiler.
Link to repl or repo (highly encouraged)
https://github.com/sandersn/jest-typescript-oomemory
Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: