ref: https://stackoverflow.com/a/62885391
Run test with the following command:
node --expose-gc ./node_modules/.bin/jest --runInBand --logHeapUsage
--expose-gc
is V8 options (seenode --v8-options
)--logHeapUsage
: https://jestjs.io/docs/cli#--logheapusage