Properly mock `path` in DependencyGraph-test
Reviewed By: jeanlauliac Differential Revision: D5111337 fbshipit-source-id: ceca2ec8917eda9ca34d65324d8b8c2a468eed1c
This commit is contained in:
parent
4f980eedbd
commit
657ea49bd6
|
@ -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