Relative Content

Tag Archive for node.jsjestjs

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.