diff --git a/test/integration/options/debug.spec.js b/test/integration/options/debug.spec.js deleted file mode 100644 index e7518283c4..0000000000 --- a/test/integration/options/debug.spec.js +++ /dev/null @@ -1,130 +0,0 @@ -'use strict'; - -var helpers = require('../helpers'); -var invokeMocha = helpers.invokeMocha; -var DEFAULT_FIXTURE = helpers.DEFAULT_FIXTURE; - -describe('--debug', function() { - describe('Node.js v8+', function() { - before(function() { - if (process.version.substring(0, 2) === 'v6') { - this.skip(); - } - }); - - it('should invoke --inspect', function(done) { - invokeMocha( - ['--debug', DEFAULT_FIXTURE], - function(err, res) { - if (err) { - return done(err); - } - expect(res, 'to contain output', /Debugger listening/i); - done(); - }, - 'pipe' - ); - }); - - it('should invoke --inspect-brk', function(done) { - var proc = invokeMocha( - ['--debug-brk', DEFAULT_FIXTURE], - function(err, res) { - if (err) { - return done(err); - } - expect(res, 'to contain output', /Debugger listening/i); - done(); - }, - 'pipe' - ); - - // debugger must be manually killed - setTimeout(function() { - process.kill(proc.pid, 'SIGINT'); - }, 2000); - }); - - it('should respect custom host/port', function(done) { - invokeMocha( - ['--debug=127.0.0.1:9229', DEFAULT_FIXTURE], - function(err, res) { - if (err) { - return done(err); - } - expect( - res, - 'to contain output', - /Debugger listening on .*127.0.0.1:9229/i - ); - done(); - }, - 'pipe' - ); - }); - - it('should warn about incorrect usage for version', function(done) { - invokeMocha( - ['--debug=127.0.0.1:9229', DEFAULT_FIXTURE], - function(err, res) { - if (err) { - return done(err); - } - expect(res, 'to contain output', /"--debug" is not available/i); - done(); - }, - 'pipe' - ); - }); - }); - - describe('Node.js v6', function() { - // note that v6.3.0 and newer supports --inspect but still supports --debug. - before(function() { - if (process.version.substring(0, 2) !== 'v6') { - this.skip(); - } - }); - - it('should start debugger', function(done) { - var proc = invokeMocha( - ['--debug', DEFAULT_FIXTURE], - function(err, res) { - if (err) { - return done(err); - } - expect(res, 'to contain output', /Debugger listening/i); - done(); - }, - 'pipe' - ); - - // debugger must be manually killed - setTimeout(function() { - process.kill(proc.pid, 'SIGINT'); - }, 2000); - }); - - it('should respect custom host/port', function(done) { - var proc = invokeMocha( - ['--debug=127.0.0.1:9229', DEFAULT_FIXTURE], - function(err, res) { - if (err) { - return done(err); - } - expect( - res, - 'to contain output', - /Debugger listening on .*127.0.0.1:9229/i - ); - done(); - }, - 'pipe' - ); - - setTimeout(function() { - process.kill(proc.pid, 'SIGINT'); - }, 2000); - }); - }); -}); diff --git a/test/node-unit/cli/node-flags.spec.js b/test/node-unit/cli/node-flags.spec.js index a66a17e4a2..e2b9b7c021 100644 --- a/test/node-unit/cli/node-flags.spec.js +++ b/test/node-unit/cli/node-flags.spec.js @@ -83,10 +83,8 @@ describe('node-flags', function() { }); describe('impliesNoTimeouts()', function() { - it('should return true for debug/inspect flags', function() { - expect(impliesNoTimeouts('debug'), 'to be true'); + it('should return true for inspect flags', function() { expect(impliesNoTimeouts('inspect'), 'to be true'); - expect(impliesNoTimeouts('debug-brk'), 'to be true'); expect(impliesNoTimeouts('inspect-brk'), 'to be true'); }); });