mirror of
https://github.com/Effect-TS/effect.git
synced 2026-12-06 03:59:09 +08:00
Co-authored-by: effect-bot <129879685+effect-bot@users.noreply.github.com>
31 lines
856 B
JavaScript
31 lines
856 B
JavaScript
// Runs the Playwright browser checks of effect/ui and the packages/ui
|
|
// packages, one at a time. Set CHROMIUM to use a Chromium other than
|
|
// Playwright's own.
|
|
import { execFileSync } from "node:child_process"
|
|
import * as Glob from "glob"
|
|
|
|
// The OpenTUI viewer check serves the DevTools page from dist/viewer.html.
|
|
execFileSync("pnpm", ["--filter", "@effect/ui-devtools", "build-viewer"], {
|
|
stdio: "inherit"
|
|
})
|
|
|
|
const checks = Glob.globSync([
|
|
"packages/effect/test/ui/**/browser/check-*.mjs",
|
|
"packages/ui/*/test/browser/check-*.mjs"
|
|
]).sort()
|
|
|
|
const failed = []
|
|
for (const check of checks) {
|
|
console.log("## " + check)
|
|
try {
|
|
execFileSync(process.execPath, [check], { stdio: "inherit" })
|
|
} catch {
|
|
failed.push(check)
|
|
}
|
|
}
|
|
|
|
if (failed.length > 0) {
|
|
console.error("Failed browser checks:\n" + failed.join("\n"))
|
|
process.exit(1)
|
|
}
|