Skip to content

Commit 2abc1a8

Browse files
committed
peer review changes; retry tests on windows
1 parent 0f6b91d commit 2abc1a8

File tree

2 files changed

+10
-19
lines changed

2 files changed

+10
-19
lines changed

bin/mocha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ debug('loaded opts', opts);
3737
const disableTimeouts = value => {
3838
if (impliesNoTimeouts(value)) {
3939
debug(`option "${value}" disabled timeouts`);
40-
mochaArgs.timeout = false;
40+
mochaArgs.timeout = 0;
4141
delete mochaArgs.timeouts;
4242
delete mochaArgs.t;
4343
}

test/integration/options/debug.spec.js

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,8 @@
33
var helpers = require('../helpers');
44
var invokeMocha = helpers.invokeMocha;
55
var DEFAULT_FIXTURE = helpers.DEFAULT_FIXTURE;
6-
var platform = require('os').platform();
76

87
describe('--debug', function() {
9-
before(function() {
10-
if (platform === 'win32') {
11-
this.skip();
12-
}
13-
});
14-
158
describe('Node.js v8+', function() {
169
before(function() {
1710
if (process.version.substring(0, 2) === 'v6') {
@@ -54,8 +47,8 @@ describe('--debug', function() {
5447

5548
// debugger must be manually killed
5649
setTimeout(function() {
57-
proc.kill('SIGINT');
58-
}, 1000);
50+
process.kill(proc.pid, 'SIGINT');
51+
}, 2000);
5952
});
6053

6154
it('should respect custom host/port', function(done) {
@@ -108,19 +101,16 @@ describe('--debug', function() {
108101
if (err) {
109102
return done(err);
110103
}
111-
expect(res, 'to have passed').and(
112-
'to contain output',
113-
/Debugger listening/i
114-
);
104+
expect(res, 'to contain output', /Debugger listening/i);
115105
done();
116106
},
117107
'pipe'
118108
);
119109

120110
// debugger must be manually killed
121111
setTimeout(function() {
122-
proc.kill('SIGINT');
123-
}, 1000);
112+
process.kill(proc.pid, 'SIGINT');
113+
}, 2000);
124114
});
125115

126116
it('should respect custom host/port', function(done) {
@@ -130,7 +120,8 @@ describe('--debug', function() {
130120
if (err) {
131121
return done(err);
132122
}
133-
expect(res, 'to have passed').and(
123+
expect(
124+
res,
134125
'to contain output',
135126
/Debugger listening on .*127.0.0.1:9229/i
136127
);
@@ -140,8 +131,8 @@ describe('--debug', function() {
140131
);
141132

142133
setTimeout(function() {
143-
proc.kill('SIGINT');
144-
}, 1000);
134+
process.kill(proc.pid, 'SIGINT');
135+
}, 2000);
145136
});
146137
});
147138
});

0 commit comments

Comments
 (0)