Testing: Mocha done() stops subsequent tests
See original GitHub issueI’m submitting a…
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
At use the standard case with the Mocha done() function, subsequent tests are not run.
it('should work', (done) => {
done();
});
it('should work too', () => {
// will not be executed
});
Expected behavior
The subsequent tests should continue to run.
What is the motivation / use case for changing the behavior?
Ability to write tests using Mocha
Environment
Angular version: 5.2.3
Browser:
- [x] Chrome (desktop) version 64.0.3282.140
For Tooling issues:
- Node version: 8.9.4
- Platform: Windows 10
Others:
Angular CLI used as a test starter.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Skip subsequent Mocha tests from spec if one fails
Mocha supports bailing after the first test failure, is that what you want? From mocha --help : -b, --bail bail after first test...
Read more >Mocha test stops without further execution of other ... - GitHub
I have found the issue and solved it myself, it was the supertest plugin which was causing the issue when assert fails ,...
Read more >Mocha test stops without further execution of ... - Google Groups
Mocha test stops without further execution of other test cases if an assert,expect or should fails in a test case. 1995 views.
Read more >Mocha - the fun, simple, flexible JavaScript test framework
Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun. Mocha tests run ......
Read more >Getting Started with Node.js and Mocha - Semaphore Tutorial
Mocha is a simple, extensible and fast testing library for Node.js. ... Next, we will update the test command in package.json to contain...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@NiKlimenko , thank you for posting the issue, it is a bug of
zone.js
not compatible with new version ofmocha
, I will fix it inzone.js
.This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.