'How to force Jest to exit a certain test file

I have a few e2e tests, one of them hangs and we can't find out why, so we want to use --forceExit. But, we don't want to force exit all the tests just a particular one because we use github actions + npm script to run these e2e tests.

How would I do that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source