Skip to content

Commit

Permalink
make cache collision test work across platforms.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestalmage committed Dec 20, 2015
1 parent 08db33e commit 4ca3aa9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/src/nyc-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ try {
var path = require('path')
var rimraf = require('rimraf')
var sinon = require('sinon')
var isWindows = require('is-windows')
var isWindows = require('is-windows')()
var spawn = require('win-spawn')
var fixtures = path.resolve(__dirname, '../fixtures')
var bin = path.resolve(__dirname, '../../bin/nyc')
Expand Down Expand Up @@ -440,7 +440,10 @@ describe('nyc', function () {
var nyc = new NYC({cwd: fixtures})
nyc.clearCache()

var proc = spawn(process.execPath, [bin, './cache-collision-runner.js'], {
var args = isWindows ? [bin] : [bin, process.execPath]
args = args.concat(['./cache-collision-runner.js'])

var proc = spawn(process.execPath, args, {
cwd: fixtures,
env: {},
stdio: 'inherit'
Expand Down

0 comments on commit 4ca3aa9

Please sign in to comment.