-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix HTML reporting display to show errors if done is called multiple …
…times, or if an exception is thrown after done is called.
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
describe('Multiple Done calls', function(){ | ||
it('should report an error if done was called more than once', function(done){ | ||
done(); | ||
done(); | ||
}) | ||
|
||
it('should report an error if an exception happened async after done was called', function (done) { | ||
done(); | ||
setTimeout(done, 50); | ||
}) | ||
|
||
it('should report an error if an exception happened after done was called', function(done){ | ||
done(); | ||
throw new Error("thrown error"); | ||
}) | ||
}) |
ae4fbca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extra emit('test end') is causing all errors to be double-reported.