Description
Running 800 unit tests using testdouble, resulting in memory leak.
Issue
There are many testdouble usages that do not seem to be deleting properly. Therefore, when building on Jenkins, it terminates with the error message:
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
This image comes from a Heap Snapshot of some of the tests.
Our currently code consists of the following, but it doesn't seem to help resolve the memory leak.
afterEach(function () { td.reset(); });
Are there any other lines that should be included to help with garbage collection?
Environment
Failing Test
Example Repo
Runkit Notebook
Code-fenced Examples
var td = require('testdouble')
// Your steps here.
Description
Running 800 unit tests using testdouble, resulting in memory leak.
Issue
There are many testdouble usages that do not seem to be deleting properly. Therefore, when building on Jenkins, it terminates with the error message:
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memoryThis image comes from a Heap Snapshot of some of the tests.
Our currently code consists of the following, but it doesn't seem to help resolve the memory leak.
afterEach(function () { td.reset(); });Are there any other lines that should be included to help with garbage collection?
Environment
node -voutput: 18.20.4npm -v(oryarn --version) output: 10.7.0npm ls testdouble(oryarn list testdouble) version: 3.20.2Failing Test
Example Repo
npm itand observe the issueRunkit Notebook
var td = require('testdouble')at the topCode-fenced Examples