From e7127a18c49e60f6779d65b7cdfa5e4d8ee58677 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 30 Jan 2021 14:15:23 +0100 Subject: [PATCH] windows? --- test/mock.js | 2 +- test/mock_sync.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/mock.js b/test/mock.js index b3e17001..1357d673 100644 --- a/test/mock.js +++ b/test/mock.js @@ -268,7 +268,7 @@ test('readPkg', function (t) { cb(null, file); }, readPkg: function (readFile, file, cb) { - if (file.indexOf('bar/package.json') >= 0) { + if (file.indexOf(path.join('bar', 'package.json')) >= 0) { cb(null, { main: './something-else.js' }); } else { cb(null, JSON.parse(files[path.resolve(file)])); diff --git a/test/mock_sync.js b/test/mock_sync.js index 46a98883..cffba1e0 100644 --- a/test/mock_sync.js +++ b/test/mock_sync.js @@ -170,7 +170,7 @@ test('readPkgSync', function (t) { return file; }, readPkgSync: function (readFileSync, file) { - if (file.indexOf('bar/package.json') >= 0) { + if (file.indexOf(path.join('bar', 'package.json')) >= 0) { return { main: './something-else.js' }; } else { return JSON.parse(files[path.resolve(file)]);