diff --git a/code/lib/create-storybook/src/generators/baseGenerator.ts b/code/lib/create-storybook/src/generators/baseGenerator.ts index b87246af1c4..391775371a4 100644 --- a/code/lib/create-storybook/src/generators/baseGenerator.ts +++ b/code/lib/create-storybook/src/generators/baseGenerator.ts @@ -277,7 +277,9 @@ export async function baseGenerator( : extraAddonPackages; // TODO: change the semver range to '^4' when VTA 4 and SB 9 is released - extraAddonsToInstall.push('@chromatic-com/storybook@^4.0.0-0'); + if (features.includes('test')) { + extraAddonsToInstall.push('@chromatic-com/storybook@^4.0.0-0'); + } // Add @storybook/addon-docs when docs feature is selected if (features.includes('docs')) {