diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2e813da9..04cd8eced 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,10 +85,10 @@ jobs: strategy: matrix: node-version: [18] - os: [ubuntu-latest] + os: [ubuntu-latest, windows-latest] timeout-minutes: 25 - name: Test on Node.js ${{ matrix.node-version }} + name: Test on Node.js ${{ matrix.node-version }} (${{ matrix.os }}) steps: - name: Checkout codes uses: actions/checkout@v4 diff --git a/specs/utils/nuxt.ts b/specs/utils/nuxt.ts index 047d06994..e28c8b697 100644 --- a/specs/utils/nuxt.ts +++ b/specs/utils/nuxt.ts @@ -69,7 +69,7 @@ export async function loadFixture(testContext: VitestContext) { ...(ctx.options.prerender ? { static: true } : {}), output: { dir: outputDir, - ...(ctx.options.prerender ? { publicDir: outputDir + '/public' } : {}) + ...(ctx.options.prerender ? { publicDir: resolve(outputDir, 'public') } : {}) } } }) diff --git a/specs/utils/server.ts b/specs/utils/server.ts index 4e2a4502d..97c979363 100644 --- a/specs/utils/server.ts +++ b/specs/utils/server.ts @@ -51,7 +51,7 @@ export async function startServer(env: Record = {}) { ctx.serverProcess.kill() throw lastError || new Error('Timeout waiting for dev server!') } else if (ctx.options.prerender) { - const command = `npx serve ${ctx.nuxt!.options.nitro!.output?.publicDir} -l tcp://${host}:${port} --no-port-switching` + const command = `pnpx serve ${ctx.nuxt!.options.nitro!.output?.publicDir} -l tcp://${host}:${port} --no-port-switching` // ; (await import('consola')).consola.restoreConsole() const [_command, ...commandArgs] = command.split(' ')