Skip to content

Commit 4405757

Browse files
committed
Replace @storybook/test-runner
1 parent b64622a commit 4405757

File tree

5 files changed

+3154
-9186
lines changed

5 files changed

+3154
-9186
lines changed

.storybook/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { mergeConfig } from "vite";
44
/** @type { import('@storybook/react-vite').StorybookConfig } */
55
export default {
66
stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"],
7-
addons: ["@storybook/addon-docs"],
7+
addons: ["@storybook/addon-docs", "@storybook/addon-vitest"],
88
framework: {
99
name: "@storybook/react-vite",
1010
options: { builder: {} },

.storybook/vitest.setup.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { setProjectAnnotations } from '@storybook/react-vite';
2+
import * as projectAnnotations from './preview';
3+
4+
// This is an important step to apply the right configuration when testing your stories.
5+
// More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
6+
setProjectAnnotations([projectAnnotations]);

0 commit comments

Comments
 (0)