diff --git a/integrations/vite/nuxt.test.ts b/integrations/vite/nuxt.test.ts index 1b834525c..ab14628c7 100644 --- a/integrations/vite/nuxt.test.ts +++ b/integrations/vite/nuxt.test.ts @@ -76,7 +76,9 @@ test('dev mode', SETUP, async ({ fs, spawn, expect }) => { test('build', SETUP, async ({ spawn, exec, expect }) => { await exec('pnpm nuxt build') - let process = await spawn('pnpm nuxt preview', { + // The Nuxt preview server does not automatically assign a free port if 3000 + // is taken, so we use a random port instead. + let process = await spawn(`pnpm nuxt preview --port 8724`, { env: { TEST: 'false', NODE_ENV: 'development',