Permalink
Browse files

Add --inspectMocha & --inspectBrkMocha flags for newer versions of no…

…de. (#661)
  • Loading branch information...
brucejo75 authored and samhatoum committed Jan 8, 2018
1 parent 17e3b0a commit 5b518297491cd24aefd45cdd6066b25281e03879
Showing with 18 additions and 0 deletions.
  1. +18 −0 src/lib/mocha/mocha.js
View
@@ -68,6 +68,24 @@ Mocha.prototype.start = function (callback) {
}
}
if (this.options.inspectMocha) {
port = parseInt(this.options.inspectMocha);
if (port > 1) {
opts.execArgv = ['--inspect=' + port];
} else {
opts.execArgv = ['--inspect'];
}
}
if (this.options.inspectBrkMocha) {
port = parseInt(this.options.inspectBrkMocha);
if (port > 1) {
opts.execArgv = ['--inspect-brk=' + port];
} else {
opts.execArgv = ['--inspect-brk'];
}
}
let _specs = [];
if (this.options._.length > 2) {
_specs = this.options._.slice(2);

0 comments on commit 5b51829

Please sign in to comment.