From 9889e7d5ca02fffc90415b82bc339f21da5eafa4 Mon Sep 17 00:00:00 2001 From: David Aurelio Date: Sat, 3 Sep 2016 01:11:34 -0700 Subject: [PATCH] re-enable and fix tests Summary: When bringing back `node-haste` to React Native, I left an `fdescribe` in a test that led to ~70 tests being skipped. This re-enables these tests, and fixes test failures Reviewed By: cpojer Differential Revision: D3811225 fbshipit-source-id: 67a16f385759bb829f1f3f559862eab7e78f2097 --- .../node-haste/__tests__/DependencyGraph-test.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/react-packager/src/node-haste/__tests__/DependencyGraph-test.js b/react-packager/src/node-haste/__tests__/DependencyGraph-test.js index f5d1510d..bf3ec649 100644 --- a/react-packager/src/node-haste/__tests__/DependencyGraph-test.js +++ b/react-packager/src/node-haste/__tests__/DependencyGraph-test.js @@ -1273,8 +1273,8 @@ describe('DependencyGraph', function() { `Failed to build DependencyGraph: @providesModule naming collision:\n` + ` Duplicate module name: index\n` + ` Paths: /root/b.js collides with /root/index.js\n\n` + - `This error is caused by a @providesModule declaration ` + - `with the same name across two different files.` + 'This error is caused by a @providesModule declaration ' + + 'with the same name across two different files.' ); expect(err.type).toEqual('DependencyGraphError'); }); @@ -2608,15 +2608,17 @@ describe('DependencyGraph', function() { let DependencyGraph; beforeEach(function() { process.platform = 'win32'; - DependencyGraph = require('../index'); // force reload with fastpath + + // force reload with fastpath + jest.resetModules(); + DependencyGraph = require('../index'); }); afterEach(function() { process.platform = realPlatform; }); - pit('should get dependencies', function() { - process.platform = 'win32'; + it('should get dependencies', function() { const root = 'C:\\root'; setMockFileSystem({ 'root': { @@ -6080,7 +6082,7 @@ describe('DependencyGraph', function() { }); }); - fdescribe('Deterministic order of dependencies', () => { + describe('Deterministic order of dependencies', () => { let callDeferreds, dependencyGraph, moduleReadDeferreds; let moduleRead; let DependencyGraph;