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
This commit is contained in:
David Aurelio 2016-09-03 01:11:34 -07:00 committed by Facebook Github Bot 0
parent dd4722161e
commit 9889e7d5ca
1 changed files with 8 additions and 6 deletions

View File

@ -1273,8 +1273,8 @@ describe('DependencyGraph', function() {
`Failed to build DependencyGraph: @providesModule naming collision:\n` + `Failed to build DependencyGraph: @providesModule naming collision:\n` +
` Duplicate module name: index\n` + ` Duplicate module name: index\n` +
` Paths: /root/b.js collides with /root/index.js\n\n` + ` Paths: /root/b.js collides with /root/index.js\n\n` +
`This error is caused by a @providesModule declaration ` + 'This error is caused by a @providesModule declaration ' +
`with the same name across two different files.` 'with the same name across two different files.'
); );
expect(err.type).toEqual('DependencyGraphError'); expect(err.type).toEqual('DependencyGraphError');
}); });
@ -2608,15 +2608,17 @@ describe('DependencyGraph', function() {
let DependencyGraph; let DependencyGraph;
beforeEach(function() { beforeEach(function() {
process.platform = 'win32'; process.platform = 'win32';
DependencyGraph = require('../index'); // force reload with fastpath
// force reload with fastpath
jest.resetModules();
DependencyGraph = require('../index');
}); });
afterEach(function() { afterEach(function() {
process.platform = realPlatform; process.platform = realPlatform;
}); });
pit('should get dependencies', function() { it('should get dependencies', function() {
process.platform = 'win32';
const root = 'C:\\root'; const root = 'C:\\root';
setMockFileSystem({ setMockFileSystem({
'root': { 'root': {
@ -6080,7 +6082,7 @@ describe('DependencyGraph', function() {
}); });
}); });
fdescribe('Deterministic order of dependencies', () => { describe('Deterministic order of dependencies', () => {
let callDeferreds, dependencyGraph, moduleReadDeferreds; let callDeferreds, dependencyGraph, moduleReadDeferreds;
let moduleRead; let moduleRead;
let DependencyGraph; let DependencyGraph;