-
-
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.
Merge pull request #1981 from Standard8/fix-done-reporting-on-html
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"); | ||
}) | ||
}) |