Skip to content

Commit 139ffd8

Browse files
committed
bug fix
1 parent a8ee87d commit 139ffd8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/jest-resolve/src/__tests__/resolve.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ describe('nodeModulesPaths', () => {
192192
});
193193

194194
describe('Resolver.getModulePaths() -> nodeModulesPaths()', () => {
195+
const _path = path;
195196
let moduleMap;
196197

197198
beforeEach(() => {
@@ -210,7 +211,7 @@ describe('Resolver.getModulePaths() -> nodeModulesPaths()', () => {
210211
});
211212

212213
it('can resolve node modules relative to absolute paths in "moduleDirectories" on Windows platforms', () => {
213-
jest.doMock('path', () => path.win32);
214+
jest.doMock('path', () => _path.win32);
214215
const path = require('path');
215216
const Resolver = require('../');
216217

@@ -229,7 +230,7 @@ describe('Resolver.getModulePaths() -> nodeModulesPaths()', () => {
229230
});
230231

231232
it('can resolve node modules relative to absolute paths in "moduleDirectories" on Posix platforms', () => {
232-
jest.doMock('path', () => path.posix);
233+
jest.doMock('path', () => _path.posix);
233234
const path = require('path');
234235
const Resolver = require('../');
235236

0 commit comments

Comments
 (0)