Description
I'm running my test suite using ava --serial --verbose
.
In the past, there have now been several cases where random tests start failing. This is reported by ava as follows:
src › controllers › calendar_test › if endpoint redirects
test/src/controllers/calendar_test.js:161
160: code
161: other code
162: some code
Rejected promise returned by test. Reason:
SqliteError {}
› test/src/controllers/calendar_test.js:161:5
So then I wonder what's happening. Often, I then discover way up in the logs that many tests have started failing because they timed out.
✖ Timed out while running tests
7 tests were pending in test/src/api/v1_test.js
◌ src › api › v1_test › a
◌ src › api › v1_test › b
◌ src › api › v1_test › c
◌ src › api › v1_test › d
◌ src › api › v1_test › e
◌ src › api › v1_test › f
◌ src › api › v1_test › g
However, these tests are not shown as "failing" in the end. Instead, the "XY tests passed" output is just decreased by the number of tests that timed out. In many cases, this isn't appropriately notifying me. Meaning, I'll just assume all tests have passed and continue my work.
For tests that time out though, what I'm expecting is that there's - as with failing tests - a big red warning and stack trace to make me aware.
Is there any option that can be enabled such that ava treats timed-out tests as failed tests?