Skip to content

Commit

Permalink
Fixed node-inspector support, swapped --debug for debug to match …
Browse files Browse the repository at this point in the history
…node. Closes #247
  • Loading branch information
tj committed Feb 15, 2012
1 parent 6cdca19 commit 41e4118
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions bin/_mocha
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var images = {

program
.version(mocha.version)
.usage('[options] [files]')
.usage('[debug] [options] [files]')
.option('-r, --require <name>', 'require the given module')
.option('-R, --reporter <name>', 'specify the reporter to use', 'dot')
.option('-u, --ui <name>', 'specify user-interface (bdd|tdd|exports)', 'bdd')
Expand All @@ -50,8 +50,9 @@ program
.option('-c, --colors', 'force enabling of colors')
.option('-C, --no-colors', 'force disabling of colors')
.option('-G, --growl', 'enable growl notification support')
.option('-d, --debug', "enable node's debugger")
.option('-d, --debug', "enable node's debugger, synonym for node --debug")
.option('-b, --bail', "bail after first test failure")
.option('--debug-brk', "enable node's debugger breaking on the first line")
.option('--globals <names>', 'allow the given comma-delimited global [names]', list, [])
.option('--ignore-leaks', 'ignore global variable leaks')
.option('--interfaces', 'display available interfaces')
Expand Down
6 changes: 5 additions & 1 deletion bin/mocha
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ var spawn = require('child_process').spawn
process.argv.slice(2).forEach(function (arg) {
switch (arg) {
case '-d':
args.unshift('--debug');
break;
case 'debug':
case '--debug':
args.unshift('debug');
case '--debug-brk':
args.unshift(arg);
break;
case '-gc':
case '--expose-gc':
Expand Down

0 comments on commit 41e4118

Please sign in to comment.