Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
This is a possible solution for issue mochajs#247
Browse files Browse the repository at this point in the history
It is working well for me, following the path suggested by @visionmedia
Note: This does change the commandline operation of mocha by changing the --debug option's meaning
and instead, mapping the previous meaning to debug (no dashes)
  • Loading branch information
JamesMaroney committed Feb 11, 2012
1 parent 8f9716d commit 1519ae7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bin/mocha
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,22 @@ var spawn = require('child_process').spawn

process.argv.slice(2).forEach(function (arg) {
switch (arg) {
case '-d':
case 'debug':
case '--debug':
case '--debug-brk':
case '--expose-gc':
args.unshift(arg);
break;
case '-d':
args.unshift('debug');
break;
case '-gc':
case '--expose-gc':
args.unshift('--expose-gc');
break;
default:
args.push(arg);
break;
}
}
});

var proc = spawn(process.argv[0], args, { customFds: [0,1,2] });
Expand Down

0 comments on commit 1519ae7

Please sign in to comment.