test(sw): shared Playwright runtime resolver
This commit is contained in:
1 parent
94c0a13c74
commit
df650c02dd
23 files changed
+120
-55
No files matched your search
@@ -1,14 +1,14 @@
|
||||
// Browser check of the consumer built by integrated-consumer.mjs (2026-10-19): both stylesheet orders, examples
|
||||
// E (custom popup) and F (Open + tool bar), HM UI inside an SW popup, Escape stack, computed-style identity.
|
||||
// Usage: node packages/sw/tests/integrated-consumer.browser.mjs <consumer-dir> <evidence-dir>
|
||||
import { createRequire } from "node:module"
|
||||
import { createServer } from "node:http"
|
||||
import { mkdir, readFile, writeFile } from "node:fs/promises"
|
||||
import path from "node:path"
|
||||
import { loadPlaywright } from "./playwright-runtime.mjs"
|
||||
|
||||
const dist = path.resolve(process.argv[2], "dist")
|
||||
const out = path.resolve(process.argv[3])
|
||||
const { chromium } = createRequire(import.meta.url)(process.env.SW_PLAYWRIGHT_PATH ?? "C:/Users/user/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/node_modules/playwright")
|
||||
const { chromium } = loadPlaywright()
|
||||
await mkdir(out, { recursive: true })
|
||||
const types = { ".html": "text/html", ".js": "text/javascript", ".css": "text/css", ".ttf": "font/ttf" }
|
||||
const server = createServer(async (request, response) => {
|
||||
|
||||
Reference in new issue
Block a user