-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
runTests in programmatic API does not throw errors #2510
Comments
Digging through code sample from nightwatches unit test I found that I could do this:
Added a custom reporter to set a variable in the parent context. I would still like to propose that by default, runnner.runTests returns the results of the tests. |
This issue has been automatically marked as stale because it has not had any recent activity. |
Bump, not stale |
This issue has been automatically marked as stale because it has not had any recent activity. |
Hi @swrdfish @beatfactor This is still an issue in Nightwatch v2.5.1.
This issue causes any test runner using Nightwatch v2 programmatic API won't able to fail the test steps like in my Cucumber-js integration nightwatchjs-community/cucumber-nightwatch#9 It's a critical issue for me, so please help if you have time. Thanks. |
Describe the bug
When using the programmatic API, the runTests function does not throw an error if the test fails, nor does it return any data about the tests that ran.
Sample test
You can see my docker setup as described here #2483
I did not expect runTests to return anything since that is not documented, however that might be a good feature to add
Successful test
Unsuccessful test
The result is the same for both tests, runTests does not throw an error for the unsuccessful test. I can see the error in the console from nightwatch, however the catch does not get hit and the text 'I ERRRORRED' is not printed.
Verbose output
Configuration
Your Environment
You can see my docker setup as described here #2483
The text was updated successfully, but these errors were encountered: