-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
45 lines (42 loc) · 1.15 KB
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/** @type {import('vite').UserConfig} */
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { config } from "dotenv";
import { defineConfig } from "vite";
import tsConfigPaths from "vite-tsconfig-paths";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export default defineConfig({
exclude: ["**/*/*.test.ts"],
plugins: [tsConfigPaths()],
test: {
env: {
...process.env,
...config({ path: ".env.test" }).parsed,
NODE_ENV: "test",
},
coverage: {
reporter: ["text"],
provider: "v8",
include: [
"src/**/*.ts",
// "src/**/*.tsx" Should we test email templates?
],
exclude: [
"src/graphql/schema.ts",
"src/**/*/generated.ts",
"src/**/*/types.ts",
"src/**/*/const.ts",
"src/**/*/tailwind.ts",
"src/emails-sender-proxy.ts",
"src/**/*/*.d.ts",
"src/instrument.*",
"src/lib/plugins/**/*/config.ts",
],
},
exclude: ["node_modules"],
include: ["**/*/*.test.ts"],
root: __dirname,
setupFiles: ["./src/lib/test/setup"],
},
});