/
githubmirror
/
cpython
Обзор
Документация
Войти
/
githubmirror
/
cpython
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
Platforms/emscripten/browser_test/playwright.config.ts
26 строк
715 B
Hood Chatham
gh-146352: In Emscripten pyrepl test, pick port dynamically (#146375)
25 мар 2026, 13:38
Не верифицирован
25 мар 2026, 13:38
2be147e
Код
Авторство
О чём код?
import { defineConfig, devices } from '@playwright/test'; import { resolve } from "node:path"; const port = process.env.PORT ?? "8787"; const crossBuildDir = resolve("../../../", process.env.CROSS_BUILD_DIR ?? "cross-build"); export default defineConfig({ testDir: '.', forbidOnly: true, retries: 2, reporter: process.env.CI ? 'dot' : 'html', use: { baseURL: `http://localhost:${port}`, trace: 'on-first-retry', }, projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, ], webServer: { command: `npx http-server ${crossBuildDir}/wasm32-emscripten/build/python/web_example_pyrepl_jspi/ -p ${port}`, url: `http://localhost:${port}`, }, });