Skip to content

Instantly share code, notes, and snippets.

@wilsonianb
Last active August 29, 2015 14:08
Show Gist options
  • Save wilsonianb/727ab0c8c1f1b65a6e6f to your computer and use it in GitHub Desktop.
Save wilsonianb/727ab0c8c1f1b65a6e6f to your computer and use it in GitHub Desktop.
Run nodejs tests in a child process
// Run node.js tests in a child process with the command:
// tools/test.py --special-command='node node-tests.js@' --mode=release simple message
var spawn = require('child_process').spawn;
var opts = {
stdio: [process.stdin, process.stdout, process.stderr]
};
var args = [process.argv[2], process.argv.slice(3), opts];
var child = spawn.apply(null, args);
child.on('close', function(code) {
process.exit(code);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment