Skip to content

Commit 7065bb8

Browse files
committed
#105 forward argv to the child
1 parent f57e0db commit 7065bb8

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

lib/child.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var QUnit = require('qunitjs'),
1212
// http://GOESSNER.net/articles/JsonPath/
1313
require('../support/json/cycle');
1414

15-
var options = JSON.parse(process.argv[2]),
15+
var options = JSON.parse(process.argv.pop()),
1616
currentModule = path.basename(options.code.path, '.js'),
1717
currentTest;
1818

lib/testrunner.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,10 @@ options = exports.options = {
5959
function runOne(opts, callback) {
6060
var child;
6161
var pingCheckTimeoutId;
62+
var argv = process.argv.slice();
6263

63-
child = cp.fork(
64-
__dirname + '/child.js',
65-
[JSON.stringify(opts)],
66-
{env: process.env}
67-
);
64+
argv.push(JSON.stringify(opts));
65+
child = cp.fork(__dirname + '/child.js', argv, {env: process.env});
6866

6967
function kill() {
7068
process.removeListener('exit', kill);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "qunit",
33
"description": "QUnit testing framework for nodejs",
4-
"version": "0.7.4",
4+
"version": "0.7.5",
55
"author": "Oleg Slobodskoi <oleg008@gmail.com>",
66
"contributors": [
77
{

0 commit comments

Comments
 (0)