-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
74 lines (71 loc) · 1.93 KB
/
Copy pathvitest.config.ts
File metadata and controls
74 lines (71 loc) · 1.93 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import path from "node:path";
import { fileURLToPath } from "node:url";
import { playwright } from "@vitest/browser-playwright";
import { storybookTest } from "@storybook/addon-vitest/vitest-plugin";
import { defineConfig } from "vitest/config";
const currentDirectory = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
optimizeDeps: {
include: [
"@react-email/body",
"@react-email/container",
"@react-email/head",
"@react-email/heading",
"@react-email/hr",
"@react-email/html",
"@react-email/img",
"@react-email/render",
"@react-email/section",
"@react-email/text",
"framer-motion",
"react-icons/ai",
"react-icons/bi",
"react-icons/ci",
"react-icons/fi",
"react-icons/fa",
"react-icons/hi",
"react-icons/io",
"react-icons/io5",
"react-icons/lu",
"react-icons/tb",
"react-images-uploading",
"react-loading-skeleton",
"react-responsive-carousel",
"react-swipeable",
],
},
test: {
projects: [
{
// Node unit tests for the pure server helpers (deviceId, cookie crypto, IP, visitor day,
// the Redis key shapes and the trackVisitAction resolve order). No browser, no storybook.
test: {
name: "unit",
environment: "node",
include: ["app/**/*.test.ts"],
},
resolve: {
alias: { "@": path.join(currentDirectory, "app") },
},
},
{
extends: true,
plugins: [
storybookTest({
configDir: path.join(currentDirectory, ".storybook"),
}),
],
test: {
name: "storybook",
fileParallelism: false,
browser: {
enabled: true,
headless: true,
provider: playwright({}),
instances: [{ browser: "chromium" }],
},
},
},
],
},
});