-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
JavaScript heap out of memory #1055
Comments
Thank you for reporting @yashsway! 🙂 The stack trace doesn't seem to say anything about what caused it inside Happy DOM, so it's impossible to reproduce based on that. I don't think the amount of tests is the reason. Do you have a repo or some reproducible example? |
@capricorn86 I'm glad to help! ah bummer :( I can't share the repo unfortunately. Hmm I'll have to figure out how to reproduce this separately. The only parameter I changed between running the tests one way or another was swapping out |
@yashsway I'm a bit worried about the memory leak. Would it be possible to run a profiler on your tests?
|
Another thing you can try is to look at tests that was running when it happened and try to run them in isolation. I don't remember how it looks in Jest, but Vitest shows a list of all current tests and which ones that are running. |
@capricorn86 |
@capricorn86 I've created a repo to reproduce a leak: https://github.com/illandril/happy-dom-leak My reproduction uses
|
It looks like this has been fixed (at least for the project I was seeing this in) somewhere between |
@yashsway please check the issue using the latest happy-dom. If issue doesn't exist anymore please close it |
Describe the bug
When running jest with
--env
set to@happy-dom/jest-environment
to run 812 tests (144 test suites), at the 81st test suite mark, the process runs out of memory. This issue does not occur in the previous configuration when running tests withjsdom
.To Reproduce
Steps to reproduce the behavior:
jest test --env=@happy-dom/jest-environment --maxWorkers=2 --silent
Expected behavior
All the tests should run with a pass/fail.
Device:
Additional context
n/a
The text was updated successfully, but these errors were encountered: