test: fix spawn ENOENT

This commit is contained in:
khai96_
2025-11-08 02:23:58 +07:00
parent 9b344c8982
commit bfb3f4e7e8

View File

@@ -695,7 +695,9 @@ test('optional dependency is hardlinked to the store if it does not require a bu
// Covers https://github.com/pnpm/pnpm/issues/7943
test('complex scenario with same optional dependencies appearing in many places of the dependency graph', async () => {
prepareEmpty()
await addDependenciesToPackage({}, ['@storybook/addon-essentials@7.6.17', 'storybook@7.6.17', 'vite@5.2.8'], testDefaults())
await addDependenciesToPackage({}, ['@storybook/addon-essentials@7.6.17', 'storybook@7.6.17', 'vite@5.2.8'], testDefaults({
ignoreScripts: true, // temporary fix for `spawn NOENT` error
}))
expect(fs.readdirSync('node_modules/.pnpm/esbuild@0.18.20/node_modules/@esbuild')).toHaveLength(1)
expect(fs.readdirSync('node_modules/.pnpm/esbuild@0.20.2/node_modules/@esbuild')).toHaveLength(1)