-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Description
I've recently ported ~5500 tests made up of ~700 test suites to take advantage of Jest's test isolation and parallel test runs (no auto mocking etc. as the tests are vanilla jasmine).
I'm seeing the first 600 or so test suites run incredibly fast (< 90s) however my machine then runs out of memory and resorts to using the swap disk which as you could imagine drastically slows the tests down adding another couple of minutes for the last 100 suites.
I'm certain my tests contain memory leaks however because the JSDom environment is disposed of after each test run I don't think this should cause an issue? i.e. it shouldn't be possible for tests themselves to leak once the JSDom global is destroyed?
On that note I did notice the JSDom window isn't being closed, the dispose method is just being passed as an arg to resolve so, unless I'm mis-reading it, it's never called? ...Saying that I did try calling it in the success and error callbacks myself but didn't see any improvement with memory consumption.
Short of throwing more RAM at it do you have any pointers / have you experienced similar problems?