Skip to content

Commit f1de0ed

Browse files
committed
add failing test
1 parent 4d5dcc6 commit f1de0ed

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

__tests__/commands/install/integration.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,3 +883,11 @@ test.concurrent('transitive file: dependencies should work', (): Promise<void> =
883883
expect(await fs.exists(path.join(config.cwd, 'node_modules', 'b'))).toBe(true);
884884
});
885885
});
886+
887+
test.concurrent('unbound transitive dependencies should not conflict with top level dependency', async () => {
888+
await runInstall({flat: true}, 'install-conflicts', async config => {
889+
expect((await fs.readJson(path.join(config.cwd, 'node_modules', 'left-pad', 'package.json'))).version).toEqual(
890+
'1.0.0',
891+
);
892+
});
893+
});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"version": "0.0.1",
3+
"dependencies": {
4+
"left-pad": ">=0.0.1"
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"dependencies": {
3+
"b": "file:b",
4+
"left-pad": "1.0.0"
5+
}
6+
}

0 commit comments

Comments
 (0)