Skip to content

Commit

Permalink
ensure invalid arguments are not ignored when using bin/mocha; closes #…
Browse files Browse the repository at this point in the history
…3687

Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
  • Loading branch information
boneskull committed Jan 24, 2019
1 parent 0899fdd commit 09f4fd2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/integration/invalid-arguments.spec.js
@@ -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'}
);
});
});

0 comments on commit 09f4fd2

Please sign in to comment.