diff --git a/test/integration/image-optimizer/test/old-sharp.test.ts b/test/integration/image-optimizer/test/old-sharp.test.ts index 0f16eba78a17a2..3e3a970c74abf0 100644 --- a/test/integration/image-optimizer/test/old-sharp.test.ts +++ b/test/integration/image-optimizer/test/old-sharp.test.ts @@ -11,17 +11,17 @@ describe('with outdated sharp', () => { await fs.writeFile( join(appDir, 'package.json'), JSON.stringify({ - packageManager: 'yarn@1.22.19', + packageManager: 'npm@10.2.5', }) ) - await execa('yarn', ['add', 'sharp@0.26.3'], { + await execa('npm', ['add', 'sharp@0.26.3'], { cwd: appDir, stdio: 'inherit', }) }) afterAll(async () => { await fs.remove(join(appDir, 'node_modules')) - await fs.remove(join(appDir, 'yarn.lock')) + await fs.remove(join(appDir, 'package-lock.json')) await fs.remove(join(appDir, 'package.json')) }) diff --git a/test/integration/image-optimizer/test/sharp.test.ts b/test/integration/image-optimizer/test/sharp.test.ts index e2b5b209d88d29..fefbeeaec02d41 100644 --- a/test/integration/image-optimizer/test/sharp.test.ts +++ b/test/integration/image-optimizer/test/sharp.test.ts @@ -11,17 +11,17 @@ describe('with latest sharp', () => { await fs.writeFile( join(appDir, 'package.json'), JSON.stringify({ - packageManager: 'yarn@1.22.19', + packageManager: 'npm@10.2.5', }) ) - await execa('yarn', ['add', 'sharp@^0.32.0'], { + await execa('npm', ['add', 'sharp@latest'], { cwd: appDir, stdio: 'inherit', }) }) afterAll(async () => { await fs.remove(join(appDir, 'node_modules')) - await fs.remove(join(appDir, 'yarn.lock')) + await fs.remove(join(appDir, 'package-lock.json')) await fs.remove(join(appDir, 'package.json')) }) diff --git a/test/integration/image-optimizer/test/util.ts b/test/integration/image-optimizer/test/util.ts index 3eb9acf795d116..f3442cde830abd 100644 --- a/test/integration/image-optimizer/test/util.ts +++ b/test/integration/image-optimizer/test/util.ts @@ -163,9 +163,7 @@ export function runTests(ctx) { 'custom-sharp.js.nft.json' ) ) - expect(traceFile.files.some((file) => file.includes('sharp/build'))).toBe( - true - ) + expect(traceFile.files.some((file) => file.includes('sharp/'))).toBe(true) }) }