29 lines · 683 B · TypeScript
RawDownload
import { fileURLToPath } from "node:url";import { playwright } from "@vitest/browser-playwright";import { defineConfig, mergeConfig } from "vitest/config"; import viteConfig from "./vite.config"; const srcPath = fileURLToPath(new URL("./src", import.meta.url)); export default mergeConfig(  viteConfig,  defineConfig({    resolve: {      alias: {        "~": srcPath,      },    },    test: {      include: ["src/components/ChatView.browser.tsx"],      browser: {        enabled: true,        provider: playwright(),        instances: [{ browser: "chromium" }],        headless: true,      },      testTimeout: 30_000,      hookTimeout: 30_000,    },  }),);