-
-
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.
Add --no-exit flag to prevent process.exit() call (close #1018)
- Loading branch information
1 parent
8bec097
commit b43cb7f
Showing
2 changed files
with
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
describe('exit', function(){ | ||
//note --bail works nicely in that it still allows an 'early exit' in an error scenario | ||
it('should not exit even in error scenario if called with --no-exit', function(done){ | ||
done(new Error('failure')); | ||
}) | ||
|
||
it('should take a long time to exit if called with --no-exit', function(done){ | ||
done(); | ||
setTimeout(function() { | ||
console.log('all done'); | ||
}, 2500) | ||
}) | ||
}) |