diff --git a/index.js b/index.js index 743ef1136..80198b2c3 100755 --- a/index.js +++ b/index.js @@ -212,7 +212,7 @@ NYC.prototype.instrumentAllFiles = function (input, output, cb) { } if (transform) { - code = transform(code, { filename: filename, relFile: inFile }) + code = transform(code, { filename: inFile, relFile: inFile }) } if (!output) { diff --git a/test/nyc-integration.js b/test/nyc-integration.js index 7c208230c..9cc5cfe8b 100644 --- a/test/nyc-integration.js +++ b/test/nyc-integration.js @@ -480,7 +480,7 @@ describe('the nyc cli', function () { proc.on('close', function (code) { code.should.equal(0) - stdout.should.match(/path:"\.\/half-covered\.js"/) + stdout.should.contain(`path:${JSON.stringify(path.resolve(fixturesCLI, 'half-covered.js'))}`) done() }) })