From 708ff2e65051abd61980b7f84d66e102014420e4 Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Mon, 4 Feb 2019 11:34:16 -0800 Subject: [PATCH] peer review changes; retry tests on windows --- bin/mocha | 2 +- test/integration/options/debug.spec.js | 19 ++++++------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/bin/mocha b/bin/mocha index 88cf8cd8fd..cec93a3366 100755 --- a/bin/mocha +++ b/bin/mocha @@ -37,7 +37,7 @@ debug('loaded opts', opts); const disableTimeouts = value => { if (impliesNoTimeouts(value)) { debug(`option "${value}" disabled timeouts`); - mochaArgs.timeout = false; + mochaArgs.timeout = 0; delete mochaArgs.timeouts; delete mochaArgs.t; } diff --git a/test/integration/options/debug.spec.js b/test/integration/options/debug.spec.js index 5a2ba17374..6fde193e5f 100644 --- a/test/integration/options/debug.spec.js +++ b/test/integration/options/debug.spec.js @@ -3,15 +3,8 @@ var helpers = require('../helpers'); var invokeMocha = helpers.invokeMocha; var DEFAULT_FIXTURE = helpers.DEFAULT_FIXTURE; -var platform = require('os').platform(); describe('--debug', function() { - before(function() { - if (platform === 'win32') { - this.skip(); - } - }); - describe('Node.js v8+', function() { before(function() { if (process.version.substring(0, 2) === 'v6') { @@ -54,8 +47,8 @@ describe('--debug', function() { // debugger must be manually killed setTimeout(function() { - proc.kill('SIGINT'); - }, 1000); + process.kill(proc.pid, 'SIGINT'); + }, 2000); }); it('should respect custom host/port', function(done) { @@ -119,8 +112,8 @@ describe('--debug', function() { // debugger must be manually killed setTimeout(function() { - proc.kill('SIGINT'); - }, 1000); + process.kill(proc.pid, 'SIGINT'); + }, 2000); }); it('should respect custom host/port', function(done) { @@ -140,8 +133,8 @@ describe('--debug', function() { ); setTimeout(function() { - proc.kill('SIGINT'); - }, 1000); + process.kill(proc.pid, 'SIGINT'); + }, 2000); }); }); });