Using variable in test cases passed to Jest’s test.each leads to undefined error
I’m trying to use jest’s test.each to do some table tests. Unfortunately, it seems I am not able to use variables in the array of test cases that I pass to the test.each.
Are there any performance impacts to always having –expose-gc on in Node?
To use --logHeapUsage
to debug memory leaks in Jest you need to enable the node flag --expose-gc
e.g:
How to check if any test has failed in Jest hook globalTeardown
I use the globalteardown hook in jest.config.js.
It works fine.
Now i need to do something in teardown script conditionally, only if there is any failed tests, the question is how can i check if there were any failure?
The project is written in Nodejs with Jest and PactumJS.