mirror of https://github.com/status-im/metro.git
Revert D5129231: packager: enable throwOnModuleCollision for jest-haste-map
Differential Revision: D5129231 fbshipit-source-id: 23e7f9246b55773dab98ee0cbcf38b1c8d5b4f30
This commit is contained in:
parent
c1ed0d872b
commit
9dad135be1
|
@ -118,7 +118,6 @@ class DependencyGraph extends EventEmitter {
|
|||
resetCache: opts.resetCache,
|
||||
retainAllFiles: true,
|
||||
roots: opts.roots,
|
||||
throwOnModuleCollision: true,
|
||||
useWatchman: opts.useWatchman,
|
||||
watch: opts.watch,
|
||||
});
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue