mirror of
https://github.com/privacy-scaling-explorations/pse.dev.git
synced 2026-01-09 14:18:02 -05:00
60 lines
1.3 KiB
JavaScript
60 lines
1.3 KiB
JavaScript
/// <reference types="vitest" />
|
|
import react from "@vitejs/plugin-react"
|
|
import path from "path"
|
|
import { defineConfig } from "vitest/config"
|
|
import { fileURLToPath } from "url"
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
globals: true,
|
|
environment: "jsdom",
|
|
setupFiles: ["./tests/setup.tsx"],
|
|
include: ["**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
exclude: [
|
|
"**/node_modules/**",
|
|
"**/dist/**",
|
|
"**/.next/**",
|
|
"**/coverage/**",
|
|
"**/.git/**",
|
|
],
|
|
css: true,
|
|
reporters: ["verbose"],
|
|
coverage: {
|
|
provider: "v8",
|
|
reporter: ["text", "json", "html"],
|
|
exclude: [
|
|
"coverage/**",
|
|
"dist/**",
|
|
"**/node_modules/**",
|
|
".next/**",
|
|
"**/*.d.ts",
|
|
"**/*.config.{js,ts,mjs}",
|
|
"**/tests/**",
|
|
"**/__tests__/**",
|
|
"**/*.test.{js,ts,jsx,tsx}",
|
|
"**/*.spec.{js,ts,jsx,tsx}",
|
|
],
|
|
},
|
|
server: {
|
|
deps: {
|
|
inline: ["vitest-canvas-mock"],
|
|
},
|
|
},
|
|
env: {
|
|
NODE_ENV: "test",
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./"),
|
|
},
|
|
},
|
|
css: {
|
|
modules: {
|
|
classNameStrategy: "non-scoped",
|
|
},
|
|
},
|
|
}) |