Properly mock path in DependencyGraph-test

Reviewed By: jeanlauliac

Differential Revision: D5111337

fbshipit-source-id: ceca2ec8917eda9ca34d65324d8b8c2a468eed1c
This commit is contained in:
Christoph Pojer authored and Facebook Github Bot committed 2017-05-23 05:18:23 -07:00
1 parent 4f980eedbd
commit 657ea49bd6
1 file changed
+2 -4
@@ -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');
});