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

Mocha tests hang when a failed test is encountered using --reporter doc #1896

Closed
christopherliu opened this issue Mar 30, 2016 · 1 comment
Closed
Labels

Comments

@christopherliu
Copy link

Meta -

OS: Windows 7 64-bit
Selenium Version: 2.53.0
Browser: Chrome
Browser Version: 49.0.2623.110 m

Expected Behavior -

I'm using a batch file that executes a Mocha test with the following command:
start "Mocha tests" mocha .\test\WebDriverJS.js --reporter doc --timeout 10000 1^>^> testing-results.html

If I do not use the --reporter doc flag:
When I run a passing test, the Chrome window closes and the command line environment running Mocha finishes.
When I run an intentionally erroneous test (line 46 is off by one character), the Chrome window opened will close, and the command line environment invoked to run Mocha finishes, reporting a failed test error ("Wait timed out").

Actual Behavior -

If I do use the --reporter doc flag:
When I run a passing test, the Chrome window closes and the command line environment running Mocha finishes. The doc reporter produces a complete HTML snippet.
When I run an intentionally erroneous test, the Chrome window opened will remain open, and the command line environment invoked to run Mocha hangs until I manually close it. The doc reporter never finishes producing HTML (tags are unclosed, etc.).

Steps to reproduce -

Attached is the text of WebDriverJS.js file used in this test. You'll need to include selenium-server-standalone-2.53.0.jar as well as the latest chromedriver (though I had the exact same problems with PhantomJS tests).

@jleyba
Copy link
Contributor

jleyba commented Jun 12, 2016

This is a bug in mocha. Should be fixed by mochajs/mocha#2307

@jleyba jleyba closed this as completed Jun 12, 2016
@lock lock bot locked and limited conversation to collaborators Aug 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants