Skip to content

Commit

Permalink
windows?
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Jan 30, 2021
1 parent 65aa1f4 commit e7127a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)]));
Expand Down
2 changes: 1 addition & 1 deletion test/mock_sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)]);
Expand Down

0 comments on commit e7127a1

Please sign in to comment.