-
-
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.
ensure invalid arguments are not ignored when using bin/mocha; closes #…
…3687 Signed-off-by: Christopher Hiller <[email protected]>
- Loading branch information
Showing
2 changed files
with
28 additions
and
2 deletions.
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,20 @@ | ||
'use strict'; | ||
|
||
var invokeMocha = require('./helpers').invokeMocha; | ||
|
||
describe('invalid arguments', function() { | ||
it('should exit with failure if arguments are invalid', function(done) { | ||
invokeMocha( | ||
['--ui'], | ||
function(err, result) { | ||
if (err) { | ||
return done(err); | ||
} | ||
expect(result, 'to have failed'); | ||
expect(result.output, 'to match', /not enough arguments/i); | ||
done(); | ||
}, | ||
{stdio: 'pipe'} | ||
); | ||
}); | ||
}); |