-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.config.mts
43 lines (41 loc) · 1.12 KB
/
vitest.config.mts
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
import path from "node:path";
import { storybookTest } from "@storybook/experimental-addon-test/vitest-plugin";
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
// More info at: https://storybook.js.org/docs/writing-tests/vitest-plugin
export default defineConfig({
plugins: [
react(),
// See options at: https://storybook.js.org/docs/writing-tests/vitest-plugin#storybooktest
storybookTest(),
],
resolve: {
alias: {
"@": path.resolve(import.meta.dirname, "src"),
},
},
optimizeDeps: {
include: ["@storybook/experimental-addon-test/internal/test-utils"],
},
test: {
globals: true,
environment: "happy-dom",
name: "storybook",
coverage: {
provider: "v8",
},
browser: {
enabled: true,
headless: true,
name: "chromium",
provider: "playwright",
},
// Make sure to adjust this pattern to match your stories files.
include: ["**/*.stories.?(m)[jt]s?(x)"],
setupFiles: ["./.storybook/vitest.setup.ts"],
typecheck: {
enabled: true,
tsconfig: "tsconfig.test.json",
},
},
});