Skip to content

Commit 09f4fd2

Browse files
committed
ensure invalid arguments are not ignored when using bin/mocha; closes #3687
Signed-off-by: Christopher Hiller <[email protected]>
1 parent 0899fdd commit 09f4fd2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
'use strict';
2+
3+
var invokeMocha = require('./helpers').invokeMocha;
4+
5+
describe('invalid arguments', function() {
6+
it('should exit with failure if arguments are invalid', function(done) {
7+
invokeMocha(
8+
['--ui'],
9+
function(err, result) {
10+
if (err) {
11+
return done(err);
12+
}
13+
expect(result, 'to have failed');
14+
expect(result.output, 'to match', /not enough arguments/i);
15+
done();
16+
},
17+
{stdio: 'pipe'}
18+
);
19+
});
20+
});

0 commit comments

Comments
 (0)