| Server IP : 68.183.124.220 / Your IP : 216.73.217.137 Web Server : Apache/2.4.18 (Ubuntu) System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : gavin ( 1000) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/gavin/workspace/happymandarin/node_modules/.bin/ |
Upload File : |
#!/usr/bin/env node
'use strict';
/**
* 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;
var path = require('path');
var getOptions = require('./options');
var args = [path.join(__dirname, '_mocha')];
// Load mocha.opts into process.argv
// Must be loaded here to handle node-specific options
getOptions();
process.argv.slice(2).forEach(function (arg) {
var flag = arg.split('=')[0];
switch (flag) {
case '-d':
args.unshift('--debug');
args.push('--no-timeouts');
break;
case 'debug':
case '--debug':
case '--debug-brk':
case '--inspect':
args.unshift(arg);
args.push('--no-timeouts');
break;
case '-gc':
case '--expose-gc':
args.unshift('--expose-gc');
break;
case '--gc-global':
case '--es_staging':
case '--no-deprecation':
case '--prof':
case '--log-timer-events':
case '--throw-deprecation':
case '--trace-deprecation':
case '--use_strict':
case '--allow-natives-syntax':
case '--perf-basic-prof':
args.unshift(arg);
break;
default:
if (arg.indexOf('--harmony') === 0) {
args.unshift(arg);
} else if (arg.indexOf('--trace') === 0) {
args.unshift(arg);
} else if (arg.indexOf('--icu-data-dir') === 0) {
args.unshift(arg);
} else if (arg.indexOf('--max-old-space-size') === 0) {
args.unshift(arg);
} else if (arg.indexOf('--preserve-symlinks') === 0) {
args.unshift(arg);
} else {
args.push(arg);
}
break;
}
});
var proc = spawn(process.execPath, args, { stdio: 'inherit' });
proc.on('exit', function (code, signal) {
process.on('exit', function () {
if (signal) {
process.kill(process.pid, signal);
} else {
process.exit(code);
}
});
});
// terminate children.
process.on('SIGINT', function () {
proc.kill('SIGINT'); // calls runner.abort()
proc.kill('SIGTERM'); // if that didn't work, we're probably in an infinite loop, so make it die.
});