Skip to main content

Error handling 🚧

danger

This article is just a draft. It is not yet complete, and you should not read it meanwhile :)

There are a few things to know about Jest failures and how they are reported to Allure.

Early failures​

If your test environment setup fails, Jest will not run any tests. If your test file has syntax errors, Jest even won't be able to understand which tests are defined in the file. Therefore, the only way to report these failures is to report them as a test case failure.

TODO: add a screenshot

--bail option​

If you use the --bail option, Jest will stop running tests after the first failure. This is useful for debugging, but it also means that you will not see all the failures in the report, and the report itself might be incomplete.

TODO: add a screenshot