diff --git a/app-min/e2e__if_playwright/app.spec.ext__if_not_plugin b/app-min/e2e__if_playwright/app.spec.ext__if_not_plugin index 9e747ef..ff58ddf 100644 --- a/app-min/e2e__if_playwright/app.spec.ext__if_not_plugin +++ b/app-min/e2e__if_playwright/app.spec.ext__if_not_plugin @@ -1,9 +1,4 @@ -// @if typescript import { test, expect } from '@playwright/test'; -// @endif -// @if babel -const { test, expect } = require('@playwright/test'); -// @endif test.beforeEach(async ({ page }) => { await page.goto('http://localhost:9000'); diff --git a/playwright/playwright.config.ext b/playwright/playwright.config.mjs similarity index 86% rename from playwright/playwright.config.ext rename to playwright/playwright.config.mjs index 2edccd3..26d7224 100644 --- a/playwright/playwright.config.ext +++ b/playwright/playwright.config.mjs @@ -1,11 +1,4 @@ -// @if typescript -import type { PlaywrightTestConfig } from '@playwright/test'; -import { devices } from '@playwright/test'; -// @endif -// @if babel -// @ts-check -const { devices } = require('@playwright/test'); -// @endif +import { defineConfig, devices } from '@playwright/test'; /** * Read environment variables from file. @@ -16,7 +9,7 @@ const { devices } = require('@playwright/test'); /** * See https://playwright.dev/docs/test-configuration. */ -const config/* @if typescript */: PlaywrightTestConfig/* @endif */ = { +export default defineConfig({ testDir: './e2e', /* Maximum time one test can run for. */ timeout: 30 * 1000, @@ -108,11 +101,4 @@ const config/* @if typescript */: PlaywrightTestConfig/* @endif */ = { command: 'npm start', port: 9000, }, -}; - -// @if typescript -export default config; -// @endif -// @if babel -module.exports = config; -// @endif +});