Permalink
Browse files

Properly mock `path` in DependencyGraph-test

Reviewed By: jeanlauliac

Differential Revision: D5111337

fbshipit-source-id: ceca2ec8917eda9ca34d65324d8b8c2a468eed1c
  • Loading branch information...
cpojer authored and facebook-github-bot committed May 23, 2017
1 parent 4f980ee commit 657ea49bd602acc881ae9cd8d910181154533f00
Showing with 2 additions and 4 deletions.
  1. +2 −4 packager/src/node-haste/__tests__/DependencyGraph-test.js
@@ -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');
});

0 comments on commit 657ea49

Please sign in to comment.