Ava: Print pending tests when interrupting AVA, or after a timeout

Created on 1 Mar 2016  路  20Comments  路  Source: avajs/ava

Issuehunt badges

If you interrupt AVA (Ctrl+C/SIGTERM) while tests are still pending, AVA should print those tests before exiting. Similarly it should print pending tests when --timeout is reached.

This should help debug which tests are taking too long.

Related to #171.

dflupu earned $80.00 by resolving this issue!

Rewarded on Issuehunt enhancement help wanted reporters scheduling

Most helpful comment

Would be really useful to use why-is-node-running to also show why tests are still pending.

All 20 comments

Great idea!

:+1:

This would be awesome. 馃憤

Would be really useful to use why-is-node-running to also show why tests are still pending.

Just curious, has there been any movement on this issue?

cc: @novemberborn

@QuotableWater7 nope. Are you interested in taking this on?

This would be tremendously useful. Is this still something that is planned @novemberborn?

@austinkelleher most definitely. Would you want to give it a go?

Ran into this problem myself - gonna try hacking something together if y'all don't mind. 馃檪

This will be easier to implement now that #1722 has landed, though perhaps we should implement it in the reporters, in which case it'd be better to wait for https://github.com/avajs/ava/pull/1776.

any update on this now https://github.com/avajs/ava/pull/1722 is merged ? Would be very useful 馃槃

@vancouverwill I haven't had much time to work on #1776. I do think it should be implemented in the reporters, but I'm happy with some duplication if that unblocks.

Would you be interested in working on this?

@novemberborn hey yeah I would be interested, could you possibly give me some guidelines in terms of code style you would Iike or any goals with it? Thanks

@vancouverwill we use XO for code style.

The reporters should receive events when tests are declared and when they finish, so it'll be possible to keep a list of pending tests (and test files, too). Then in lib/cli there should be a hook for SIGINT & SIGTERM to make the reporters stop listening to incoming events and shut down the workers, and then print the pending tests & test files. The same for --timeout handling.

At least that's the theory, it may be a bit different in practice 馃槃

great, i've started to take a look at it, busy with the day job but hopefully I can get more time on the wk 馃槃

can you assign me so no one else ends up having to create duplicate/wasted work?

1886 implements this for timeouts, in the --verbose logger.

We still want to implement this for when the process is interrupted ("killed"), and in the default mini reporter too.

Thank you @vancouverwill for getting us this far!

@issuehuntfest has funded $80.00 to this issue. See it on IssueHunt

@dflupu has submitted a pull request. See it on IssueHunt

@sindresorhus has rewarded $72.00 to @dflupu. See it on IssueHunt

  • :moneybag: Total deposit: $80.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $8.00
Was this page helpful?
0 / 5 - 0 ratings