Open History to see the last commit
1import { fileURLToPath } from "node:url";
2import { playwright } from "@vitest/browser-playwright";
3import { defineConfig, mergeConfig } from "vitest/config";
4
5import viteConfig from "./vite.config";
6
7const srcPath = fileURLToPath(new URL("./src", import.meta.url));
8
9export default mergeConfig(
10 viteConfig,
11 defineConfig({
12 resolve: {
13 alias: {
14 "~": srcPath,
15 },
16 },
17 test: {
18 include: ["src/components/**/*.browser.tsx"],
19 browser: {
20 enabled: true,
21 provider: playwright(),
22 instances: [{ browser: "chromium" }],
23 headless: true,
24 },
25 testTimeout: 30_000,
26 hookTimeout: 30_000,
27 },
28 }),
29);