-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathvitest.config.ts
More file actions
38 lines (35 loc) · 1.32 KB
/
vitest.config.ts
File metadata and controls
38 lines (35 loc) · 1.32 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
import {defineConfig, mergeConfig} from "vitest/config";
import {playwright} from "@vitest/browser-playwright";
import {storybookTest} from "@storybook/addon-vitest/vitest-plugin";
import viteConfig from "./vite.config";
// More info at: https://storybook.js.org/docs/writing-tests/vitest-plugin
export default mergeConfig(
viteConfig,
defineConfig({
test: {
projects: [
{
extends: true,
plugins: [
// See options at: https://storybook.js.org/docs/writing-tests/vitest-plugin#storybooktest
storybookTest({
configDir: ".storybook",
storybookUrl:
process.env.SB_URL || "http://localhost:6061",
}),
],
test: {
name: "storybook",
browser: {
enabled: true,
instances: [{browser: "chromium"}],
headless: true,
provider: playwright({}),
},
setupFiles: ["./.storybook/vitest.setup.ts"],
},
},
],
},
}),
);