cpython/Tools/wasm/emscripten/browser_test/playwright.config.ts
Hood Chatham ae4d27eba7
gh-124621: Emscripten: Add smoke test for using pyrepl in Chrome (#137004)
Adds a mechanism to test browser-based initialisation of the Python interpreter,
via a Playwright headless browser instance.
2025-07-24 14:44:02 +08:00

22 lines
544 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: '.',
forbidOnly: true,
retries: 2,
reporter: process.env.CI ? 'dot' : 'html',
use: {
baseURL: 'http://localhost:8787',
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: 'npx http-server ../../../../cross-build/wasm32-emscripten/build/python/web_example_pyrepl_jspi/ -p 8787',
url: 'http://localhost:8787',
},
});