diff --git a/docs/_snippets/portable-stories-vitest-compose-stories.md b/docs/_snippets/portable-stories-vitest-compose-stories.md index 8ee390c4824f..3ac894b23af5 100644 --- a/docs/_snippets/portable-stories-vitest-compose-stories.md +++ b/docs/_snippets/portable-stories-vitest-compose-stories.md @@ -1,6 +1,7 @@ ```tsx filename="Button.test.tsx" renderer="react" language="ts" import { test, expect } from 'vitest'; import { screen } from '@testing-library/react'; +// 👉 Using Next.js? Import from @storybook/nextjs instead import { composeStories } from '@storybook/react'; // Import all stories and the component annotations from the stories file diff --git a/docs/api/portable-stories/portable-stories-vitest.mdx b/docs/api/portable-stories/portable-stories-vitest.mdx index f44d173dffc1..3093fea2b4d4 100644 --- a/docs/api/portable-stories/portable-stories-vitest.mdx +++ b/docs/api/portable-stories/portable-stories-vitest.mdx @@ -28,7 +28,7 @@ sidebar: - **Using `Next.js`?** Next.js requires specific configuration that is only available in [Jest](./portable-stories-jest.mdx). The portable stories API is not supported in Next.js with Vitest. + **Using `Next.js`?** You can test your Next.js stories with Vitest by installing and setting up the [`vite-plugin-storybook-nextjs`](https://github.com/storybookjs/vite-plugin-storybook-nextjs) package.