diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c2929cb..f89d8de 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: ["14", "16", "18", "20", "22"] + node: ["20"] name: Test on Node.js ${{ matrix.node }} steps: - uses: actions/checkout@v4 @@ -25,6 +25,8 @@ jobs: run: yarn --frozen-lockfile - name: Build run: yarn build + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 - name: Test run: yarn test - name: Check style diff --git a/e2e/e2e.ts b/e2e/e2e.ts index cc17a93..ca76c91 100644 --- a/e2e/e2e.ts +++ b/e2e/e2e.ts @@ -7,7 +7,7 @@ import fs from "fs"; import type { AddressInfo } from "net"; import { jest } from "@jest/globals"; -import { firefox } from "playwright"; +import { firefox, chromium } from "playwright"; import type { RollupOutput } from "rollup"; import vitePluginWasm from "../src/index.js"; @@ -129,12 +129,14 @@ async function startDevServer(tempDir: string, vitePackages: VitePackages): Prom } async function createBrowser(modernBrowser: boolean) { - return await firefox.launch({ - firefoxUserPrefs: { - // Simulate a legacy browser with ES modules support disabled - "dom.moduleScripts.enabled": modernBrowser - } - }); + return modernBrowser + ? await chromium.launch() + : await firefox.launch({ + firefoxUserPrefs: { + // Simulate a legacy browser with ES modules support disabled + "dom.moduleScripts.enabled": false + } + }); } async function runTest(