Skip to content

Commit 96e196a

Browse files
committed
tests
1 parent ce435c6 commit 96e196a

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

test/integration/options/node-flags.spec.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,19 @@ describe('node flags', function() {
1717
);
1818
});
1919
});
20+
21+
describe('node flags using "--node-option"', function() {
22+
it('should pass fake option to node and fail with node exception', function(done) {
23+
invokeMocha(
24+
['--node-option', 'fake-flag'],
25+
function(err, res) {
26+
if (err) {
27+
return done(err);
28+
}
29+
expect(res, 'to have failed with output', /bad option: --fake-flag/i);
30+
done();
31+
},
32+
'pipe'
33+
);
34+
});
35+
});

test/integration/options/timeout.spec.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('--timeout', function() {
5050
});
5151
});
5252

53-
it('should disable timeout with --inspect', function(done) {
53+
it('should disable timeout with "--inspect"', function(done) {
5454
var fixture = 'options/slow-test';
5555
runMochaJSON(fixture, ['--inspect', '--timeout', '200'], function(
5656
err,
@@ -64,4 +64,19 @@ describe('--timeout', function() {
6464
done();
6565
});
6666
});
67+
68+
it('should disable timeout with "-n inspect"', function(done) {
69+
var fixture = 'options/slow-test';
70+
runMochaJSON(fixture, ['-n', 'inspect', '--timeout', '200'], function(
71+
err,
72+
res
73+
) {
74+
if (err) {
75+
done(err);
76+
return;
77+
}
78+
expect(res, 'to have passed').and('to have passed test count', 2);
79+
done();
80+
});
81+
});
6782
});

0 commit comments

Comments
 (0)