Revert D5129231: packager: enable throwOnModuleCollision for jest-haste-map

Differential Revision: D5129231

fbshipit-source-id: 23e7f9246b55773dab98ee0cbcf38b1c8d5b4f30
This commit is contained in:
Jean Lauliac 2017-06-05 03:58:42 -07:00 committed by Facebook Github Bot
parent c1ed0d872b
commit 9dad135be1
2 changed files with 3 additions and 3 deletions

View File

@ -118,7 +118,6 @@ class DependencyGraph extends EventEmitter {
resetCache: opts.resetCache,
retainAllFiles: true,
roots: opts.roots,
throwOnModuleCollision: true,
useWatchman: opts.useWatchman,
watch: opts.watch,
});

View File

@ -1127,13 +1127,14 @@ describe('DependencyGraph', function() {
return dgraph.catch(err => {
expect(err.message).toEqual(
'jest-haste-map: @providesModule naming collision:\n' +
`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.',
);
expect(console.warn).not.toBeCalled();
expect(err.type).toEqual('DependencyGraphError');
expect(console.warn).toBeCalled();
});
});