Skip to content
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

When the tests do not produce TAP output, unitest hangs indefinitely on browser tests only. #4

Open
lxe opened this issue May 12, 2016 · 2 comments

Comments

@lxe
Copy link
Contributor

lxe commented May 12, 2016

If the test script doesn't produce TAP output, the --browser tests will hang indefinitely. This does not affect the --node tests.

To demonstrate, create a blank file not-tap-output.js or put some code in it that doesn't produce a tap output:

$ unitest --browser=not-tap-output.js
possibly has some console logs etc....

... hangs
@rtsao
Copy link
Owner

rtsao commented May 12, 2016

By default, electron will run indefinitely unless explicitly closed. This is a similar issue to max-mapper/electron-spawn#17

After a quick search I found the following issue (for being able to check if the event loop is empty in electron) but it was marked as wontfix: electron/electron#2358

unitest currently relies on https://github.com/substack/tap-finished to determine when execution has completed.

A default timeout for electron tests could be added, I suppose.

@rtsao
Copy link
Owner

rtsao commented Nov 7, 2017

I think a warning should be logged if no browser test output is found after 5 seconds. This would make it obvious as to why tests would be hanging.

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

2 participants