Skip to content

"✖ Timed out while running tests" are not reported as failing tests #2639

Closed
@TimDaub

Description

@TimDaub

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions