diff --git a/__tests__/commands/install/integration.js b/__tests__/commands/install/integration.js index 7abe6a11a1..dd82fa0e34 100644 --- a/__tests__/commands/install/integration.js +++ b/__tests__/commands/install/integration.js @@ -883,3 +883,12 @@ test.concurrent('transitive file: dependencies should work', (): Promise = expect(await fs.exists(path.join(config.cwd, 'node_modules', 'b'))).toBe(true); }); }); + +// Unskip once https://github.com/yarnpkg/yarn/issues/3778 is resolved +test.skip('unbound transitive dependencies should not conflict with top level dependency', async () => { + await runInstall({flat: true}, 'install-conflicts', async config => { + expect((await fs.readJson(path.join(config.cwd, 'node_modules', 'left-pad', 'package.json'))).version).toEqual( + '1.0.0', + ); + }); +}); diff --git a/__tests__/fixtures/install/install-conflicts/b/package.json b/__tests__/fixtures/install/install-conflicts/b/package.json new file mode 100644 index 0000000000..63d108a4ce --- /dev/null +++ b/__tests__/fixtures/install/install-conflicts/b/package.json @@ -0,0 +1,6 @@ +{ + "version": "0.0.1", + "dependencies": { + "left-pad": ">=0.0.1" + } +} diff --git a/__tests__/fixtures/install/install-conflicts/package.json b/__tests__/fixtures/install/install-conflicts/package.json new file mode 100644 index 0000000000..42f2c2b70a --- /dev/null +++ b/__tests__/fixtures/install/install-conflicts/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "b": "file:b", + "left-pad": "1.0.0" + } +}