I'm trying to understand why my jest tests are leaking memory but I've not idea what can be the cause. Looks like jest allocates a huge amount of strings (seems the imports) but I don't understand why they do that.
I start the tests disabling module cache:
node --inspect-brk --expose-gc ./node_modules/.bin/jest --runInBand --logHeapUsage --no-cache
and I get the following output:
as you see, there are tons of MB allocated for module contents.
Any idea how can I try to reduce that amount of memory?