Skip to content

Commit 1141a60

Browse files
committed
Add a test to check that duplicate copies of aliased packages are not created
1 parent ab6f33d commit 1141a60

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/acceptance-tests/pkg-tests-specs/sources/node-modules.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,25 @@ describe(`Node_Modules`, () => {
347347
),
348348
);
349349

350+
test(`should not create duplicate copies of aliased packages`,
351+
makeTemporaryEnv(
352+
{
353+
private: true,
354+
dependencies: {
355+
[`no-deps2`]: `npm:[email protected]`,
356+
},
357+
},
358+
{
359+
nodeLinker: `node-modules`,
360+
},
361+
async ({path, run, source}) => {
362+
await run(`install`);
363+
364+
expect(await xfs.existsPromise(`${path}/node_modules/no-deps2/node_modules/no-deps` as PortablePath)).toBe(false);
365+
},
366+
),
367+
);
368+
350369
test(`should not hoist package peer dependent on parent if conflict exists`,
351370
// . -> dep -> conflict@2 -> unhoistable --> conflict
352371
// -> conflict@1

0 commit comments

Comments
 (0)