Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ workflows:
requires:
- create-sandboxes
- vitest-integration:
parallelism: 11
parallelism: 13
requires:
- create-sandboxes
- test-portable-stories:
Expand Down Expand Up @@ -1106,7 +1106,7 @@ workflows:
requires:
- create-sandboxes
- vitest-integration:
parallelism: 6
parallelism: 7
requires:
- create-sandboxes
- test-portable-stories:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
requires:
- create-sandboxes
- vitest-integration:
parallelism: 11
parallelism: 13
requires:
- create-sandboxes
- test-portable-stories:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/workflows/merged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
requires:
- create-sandboxes
- vitest-integration:
parallelism: 6
parallelism: 7
requires:
- create-sandboxes
- test-portable-stories:
Expand Down
1 change: 1 addition & 0 deletions code/addons/vitest/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const SUPPORTED_FRAMEWORKS = [
'@storybook/nextjs',
'@storybook/nextjs-vite',
'@storybook/react-vite',
'@storybook/preact-vite',
'@storybook/svelte-vite',
'@storybook/vue3-vite',
'@storybook/html-vite',
Expand Down
4 changes: 2 additions & 2 deletions code/lib/cli-storybook/src/sandbox-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ export const baseTemplates = {
modifications: {
extraDependencies: ['preact-render-to-string'],
},
skipTasks: ['e2e-tests', 'bench', 'vitest-integration'],
skipTasks: ['e2e-tests', 'bench'],
},
'preact-vite/default-ts': {
name: 'Preact Latest (Vite | TypeScript)',
Expand All @@ -628,7 +628,7 @@ export const baseTemplates = {
modifications: {
extraDependencies: ['preact-render-to-string'],
},
skipTasks: ['e2e-tests', 'bench', 'vitest-integration'],
skipTasks: ['e2e-tests', 'bench'],
},
'qwik-vite/default-ts': {
name: 'Qwik CLI Latest (Vite | TypeScript)',
Expand Down
8 changes: 4 additions & 4 deletions docs/writing-tests/integrations/vitest-addon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ sidebar:
title: Vitest addon
---

<If notRenderer={['react', 'vue', 'svelte', 'web-components']}>
<If notRenderer={['react', 'preact', 'vue', 'svelte', 'web-components']}>

<Callout variant="info">

The Vitest addon is currently only supported in [React](?renderer=react), [Vue](?renderer=vue), [Svelte](?renderer=svelte), and [Web Components](?renderer=web-components) projects, which use the [Vite builder](../builders/vite.mdx) (or the [Next.js framework with Vite](../get-started/frameworks/nextjs.mdx#with-vite)).
The Vitest addon is currently only supported in [React](?renderer=react), [Preact](?renderer=preact), [Vue](?renderer=vue), [Svelte](?renderer=svelte), and [Web Components](?renderer=web-components) projects, which use the [Vite builder](../builders/vite.mdx) (or the [Next.js framework with Vite](../get-started/frameworks/nextjs.mdx#with-vite)).

If you are using a different renderer (such as Angular) or the Webpack builder, you can use the [Storyboook test runner](./test-runner.mdx) to test your stories.

Expand All @@ -18,7 +18,7 @@ If you are using a different renderer (such as Angular) or the Webpack builder,
</If>
{/* End non-supported renderers */}

<If renderer={['react', 'vue', 'svelte', 'web-components']}>
<If renderer={['react', 'preact', 'vue', 'svelte', 'web-components']}>

Storybook's Vitest addon allows you to test your components directly inside Storybook. On its own, it transforms your [stories](../../writing-stories/index.mdx) into component tests, which test the rendering and behavior of your components in a real browser environment. It can also calculate project [coverage](../test-coverage.mdx) provided by your stories.

Expand All @@ -34,7 +34,7 @@ You can also run tests in watch mode, which will automatically re-run tests when

Before installing, make sure your project meets the following requirements:

- A Storybook framework that uses Vite (e.g. [`vue3-vite`](../../get-started/frameworks/vue3-vite.mdx), [`react-vite`](../../get-started/frameworks/react-vite.mdx), [`nextjs-vite`](../../get-started/frameworks/nextjs.mdx#with-vite), [`sveltekit`](../../get-started/frameworks/sveltekit.mdx), etc.)
- A Storybook framework that uses Vite (e.g. [`vue3-vite`](../../get-started/frameworks/vue3-vite.mdx), [`react-vite`](../../get-started/frameworks/react-vite.mdx), [`preact-vite`](../../get-started/frameworks/preact-vite.mdx), [`nextjs-vite`](../../get-started/frameworks/nextjs.mdx#with-vite), [`sveltekit`](../../get-started/frameworks/sveltekit.mdx), etc.)
- Vitest ≥ 3.0
- If you're not yet using Vitest, it will be installed and configured for you when you install the addon
- (optional) MSW ≥ 2.0
Expand Down
Loading