diff --git a/.circleci/config.yml b/.circleci/config.yml index 60a5b6db83f6..385972ef21d8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1011,7 +1011,7 @@ workflows: requires: - create-sandboxes - vitest-integration: - parallelism: 11 + parallelism: 13 requires: - create-sandboxes - test-portable-stories: @@ -1106,7 +1106,7 @@ workflows: requires: - create-sandboxes - vitest-integration: - parallelism: 6 + parallelism: 7 requires: - create-sandboxes - test-portable-stories: diff --git a/.circleci/src/workflows/daily.yml b/.circleci/src/workflows/daily.yml index be7814aba520..0f31c5279609 100644 --- a/.circleci/src/workflows/daily.yml +++ b/.circleci/src/workflows/daily.yml @@ -54,7 +54,7 @@ jobs: requires: - create-sandboxes - vitest-integration: - parallelism: 11 + parallelism: 13 requires: - create-sandboxes - test-portable-stories: diff --git a/.circleci/src/workflows/merged.yml b/.circleci/src/workflows/merged.yml index 34b8fc22a199..bdf687d408a4 100644 --- a/.circleci/src/workflows/merged.yml +++ b/.circleci/src/workflows/merged.yml @@ -54,7 +54,7 @@ jobs: requires: - create-sandboxes - vitest-integration: - parallelism: 6 + parallelism: 7 requires: - create-sandboxes - test-portable-stories: diff --git a/code/addons/vitest/src/constants.ts b/code/addons/vitest/src/constants.ts index 7ef81afb73d3..05c92bc41a23 100644 --- a/code/addons/vitest/src/constants.ts +++ b/code/addons/vitest/src/constants.ts @@ -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', diff --git a/code/lib/cli-storybook/src/sandbox-templates.ts b/code/lib/cli-storybook/src/sandbox-templates.ts index 49914b4088d9..c9f9302cfbf3 100644 --- a/code/lib/cli-storybook/src/sandbox-templates.ts +++ b/code/lib/cli-storybook/src/sandbox-templates.ts @@ -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)', @@ -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)', diff --git a/docs/writing-tests/integrations/vitest-addon.mdx b/docs/writing-tests/integrations/vitest-addon.mdx index 80e131d82fd2..50148d992e2c 100644 --- a/docs/writing-tests/integrations/vitest-addon.mdx +++ b/docs/writing-tests/integrations/vitest-addon.mdx @@ -5,11 +5,11 @@ sidebar: title: Vitest addon --- - + -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. @@ -18,7 +18,7 @@ If you are using a different renderer (such as Angular) or the Webpack builder, {/* End non-supported renderers */} - + 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. @@ -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