diff --git a/test/integration/options/node-flags.spec.js b/test/integration/options/node-flags.spec.js index b884482527..b1a87ac296 100644 --- a/test/integration/options/node-flags.spec.js +++ b/test/integration/options/node-flags.spec.js @@ -17,3 +17,19 @@ describe('node flags', function() { ); }); }); + +describe('node flags using "--node-option"', function() { + it('should pass fake option to node and fail with node exception', function(done) { + invokeMocha( + ['--node-option', 'fake-flag'], + function(err, res) { + if (err) { + return done(err); + } + expect(res, 'to have failed with output', /bad option: --fake-flag/i); + done(); + }, + 'pipe' + ); + }); +}); diff --git a/test/integration/options/timeout.spec.js b/test/integration/options/timeout.spec.js index 4470c8b310..e2524c12f8 100644 --- a/test/integration/options/timeout.spec.js +++ b/test/integration/options/timeout.spec.js @@ -50,7 +50,7 @@ describe('--timeout', function() { }); }); - it('should disable timeout with --inspect', function(done) { + it('should disable timeout with "--inspect"', function(done) { var fixture = 'options/slow-test'; runMochaJSON(fixture, ['--inspect', '--timeout', '200'], function( err, @@ -64,4 +64,19 @@ describe('--timeout', function() { done(); }); }); + + it('should disable timeout with "-n inspect"', function(done) { + var fixture = 'options/slow-test'; + runMochaJSON(fixture, ['-n', 'inspect', '--timeout', '200'], function( + err, + res + ) { + if (err) { + done(err); + return; + } + expect(res, 'to have passed').and('to have passed test count', 2); + done(); + }); + }); });