From d3edfe176313da39e9d4e1b3b192bfec290fe2dc Mon Sep 17 00:00:00 2001 From: Zack Tanner <1939140+ztanner@users.noreply.github.com> Date: Sat, 22 Jun 2024 20:28:11 +0200 Subject: [PATCH] tweak import-conditions test (#67116) This test was failing when deployed with _"Unsupported URL Type "link:"._ This tweaks the linking behavior when deployed. I wasn't able to get this test to pass when changing both `start` and deploy to use `link`. --- .../e2e/import-conditions/import-conditions.test.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/e2e/import-conditions/import-conditions.test.ts b/test/e2e/import-conditions/import-conditions.test.ts index 53c44c9ada2c3..660863036a502 100644 --- a/test/e2e/import-conditions/import-conditions.test.ts +++ b/test/e2e/import-conditions/import-conditions.test.ts @@ -1,11 +1,18 @@ import { nextTestSetup } from 'e2e-utils' describe('react version', () => { + const dependencies = (global as any).isNextDeploy + ? // `link` is incompatible with the npm version used when this test is deployed + { + 'library-with-exports': 'file:./library-with-exports', + } + : { + 'library-with-exports': 'link:./library-with-exports', + } + const { next } = nextTestSetup({ files: __dirname, - dependencies: { - 'library-with-exports': 'link:./library-with-exports', - }, + dependencies, }) it('Pages Router page headers with edge runtime', async () => {