Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 33 lines (28 sloc) 0.711 kB
#!/usr/bin/env node
/**
* This tiny wrapper file checks for known node flags and appends them
* when found, before invoking the "real" _mocha(1) executable.
*/
var spawn = require('child_process').spawn
, args = [ __dirname + '/_mocha' ];
process.argv.slice(2).forEach(function (arg) {
switch (arg) {
case '-d':
args.unshift('--debug');
break;
case 'debug':
case '--debug':
case '--debug-brk':
args.unshift(arg);
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] });
proc.on('exit', process.exit);
Jump to Line
Something went wrong with that request. Please try again.