Skip to content

Timeout message doesn't show which error timed out #1029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fregante opened this issue Sep 1, 2016 · 2 comments
Closed

Timeout message doesn't show which error timed out #1029

fregante opened this issue Sep 1, 2016 · 2 comments

Comments

@fregante
Copy link

fregante commented Sep 1, 2016

Description

When ava fails because of a timeout, there's no way to know which test timed out

Test Source

import test from 'ava';

test('testing a test', async t => {
    t.true(await new Promise(() => {}));
});

Error Message & Stack Trace

$ ava --timeout 1s

   1 exception


   ✖ Exited because no new tests completed within the last 1000ms of inactivity

Config

None

Command-Line Arguments

$ ava --timeout 1s

Environment

OSX 10.11
ava 0.16.0
node v6.2.2
npm 3.10.6

@vadimdemedes
Copy link
Contributor

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.

@novemberborn
Copy link
Member

I've updated #583 to also print pending tests after a timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants