Files
openscreen/vitest.browser.config.ts
T
2026-04-07 12:58:33 -04:00

31 lines
818 B
TypeScript

import path from "node:path";
import { playwright } from "@vitest/browser-playwright";
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
include: ["src/**/*.browser.test.{ts,tsx}"],
browser: {
enabled: true,
provider: playwright({
launch: {
// Software WebGL so Pixi.js works in headless CI without a GPU.
args: ["--enable-unsafe-swiftshader", "--use-gl=swiftshader"],
},
}),
headless: true,
instances: [{ browser: "chromium" }],
},
// GIF export encodes frames and renders — give it plenty of time.
testTimeout: 120_000,
hookTimeout: 30_000,
},
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
},
},
// Let Vite treat .webm and .wasm files as static assets importable via `?url`.
assetsInclude: ["**/*.webm"],
});