mirror of https://github.com/status-im/metro.git
Properly mock `path` in DependencyGraph-test
Reviewed By: jeanlauliac Differential Revision: D5111337 fbshipit-source-id: ceca2ec8917eda9ca34d65324d8b8c2a468eed1c
This commit is contained in:
parent
f8a724121b
commit
4ebe1e70fc
|
@ -30,11 +30,9 @@ jest.mock(
|
|||
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
|
||||
|
||||
const path = require('path');
|
||||
|
||||
beforeEach(() => {
|
||||
jest.resetModules();
|
||||
jest.mock('path', () => path);
|
||||
jest.mock('path', () => require.requireActual('path'));
|
||||
});
|
||||
|
||||
describe('DependencyGraph', function() {
|
||||
|
@ -2522,7 +2520,7 @@ describe('DependencyGraph', function() {
|
|||
|
||||
// reload path module
|
||||
jest.resetModules();
|
||||
jest.mock('path', () => path.win32);
|
||||
jest.mock('path', () => require.requireActual('path').win32);
|
||||
DependencyGraph = require('../DependencyGraph');
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue