Skip to content

Commit

Permalink
fix: auto-install-peers in a workspace
Browse files Browse the repository at this point in the history
close #4820
  • Loading branch information
zkochan committed Sep 16, 2022
1 parent ebf6ee0 commit b5957d5
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions packages/core/test/install/autoInstallPeers.ts
Expand Up @@ -266,3 +266,32 @@ test('automatically install peer dependency when it is a dev dependency in anoth
'is-positive': '1.0.0',
})
})

// Covers https://github.com/pnpm/pnpm/issues/4820
test('auto install peer deps in a workspace', async () => {
prepareEmpty()
await mutateModules([
{
buildIndex: 0,
manifest: {
name: 'root-project',
devDependencies: {
'@pnpm.e2e/abc-parent-with-ab': '1.0.0',
},
},
mutation: 'install',
rootDir: process.cwd(),
},
{
buildIndex: 0,
manifest: {
name: 'project',
peerDependencies: {
'@pnpm.e2e/abc-parent-with-ab': '1.0.0',
},
},
mutation: 'install',
rootDir: path.resolve('project'),
},
], await testDefaults({ autoInstallPeers: true }))
})

0 comments on commit b5957d5

Please sign in to comment.