Skip to content

Commit

Permalink
fix tests failing on appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
silkentrance committed Dec 9, 2017
1 parent 9a9598f commit 302c782
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
],
"scripts": {
"clean": "rm -Rf ./coverage",
"test": "istanbul cover _mocha --report none --print none --dir ./coverage/json -u exports -R test/*-test.js && istanbul report --root ./coverage/json html && istanbul check-coverage || true",
"test": "istanbul cover ./node_modules/mocha/bin/_mocha --report none --print none --dir ./coverage/json -u exports -R test/*-test.js && istanbul report --root ./coverage/json html && istanbul check-coverage || true",
"doc": "jsdoc -c .jsdoc.json"
}
}
16 changes: 7 additions & 9 deletions test/child-process.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,16 @@ function _do_spawn(command_args, cb) {

if (process.env.running_under_istanbul) {
var
istanbul_path = path.join(__dirname, '..', 'node_modules', '.bin', 'istanbul'),
istanbul_args = [
'cover', '--report' , 'none', '--print', 'none', '--dir', path.join('coverage', 'json'),
'--include-pid', command_args[0], '--', command_args[1]
];
child = spawn(istanbul_path, istanbul_args);
}
else {
child = spawn(node_path, command_args);
istanbul_path = path.join(__dirname, '..', 'node_modules', 'istanbul', 'lib', 'cli.js');
command_args = [
istanbul_path, 'cover', '--report' , 'none', '--print', 'none',
'--dir', path.join('coverage', 'json'), '--include-pid',
command_args[0], '--', command_args[1]
];
}
// spawn doesn’t have the quoting problems that exec does,
// especially when going for Windows portability.
child = spawn(node_path, istanbul_args);
child.stdin.end();
// TODO:we no longer support node 0.6
// Cannot use 'close' event because not on node-0.6.
Expand Down

0 comments on commit 302c782

Please sign in to comment.