When ava fails because of a timeout, there's no way to know which test timed out
import test from 'ava';
test('testing a test', async t => {
t.true(await new Promise(() => {}));
});
$ ava --timeout 1s
1 exception
✖ Exited because no new tests completed within the last 1000ms of inactivity
None
$ ava --timeout 1s
OSX 10.11
ava 0.16.0
node v6.2.2
npm 3.10.6
AVA does not show which test timed out, because AVA does not track timeouts per test. What we do is, we reset one global timer every time the test finishes. So what AVA implements is actually a global idle timer. When no new tests have completed during a specified time frame, AVA fails with a timeout message.
Please check out the docs regarding timeouts: https://github.com/avajs/ava#global-timeout.
Although, I agree that this feature would be useful. Related: #583.
I've updated #583 to also print pending tests after a timeout.
Most helpful comment
I've updated #583 to also print pending tests after a timeout.