Skip to content

[Bug]: Storybook 9 - Storybook Test postinstall does not detect vitest.projects.ts file #31125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yannbf opened this issue Apr 15, 2025 · 0 comments
Assignees
Labels
addon: test bug internal-qa This issue was reported by the Storybook team, potentially on unreleased or prerelease software. needs triage

Comments

@yannbf
Copy link
Member

yannbf commented Apr 15, 2025

Describe the bug

In Vitest, normally users write vitest.workspace.ts file to configure their setup, but a vitest.projects.ts file is also possible, as an alias to workspace. Check the docs here.

When installing Storybook vitest addon, it doesn't detect a projects file.

Steps:

  • Find any Storybook project with a vitest.workspace.ts file
  • Rename it to vitest.projects.ts
  • Run npx storybook add @storybook/addon-vitest
  • Notice that it will ignore the vitest projects file and create an entirely new vitest.workspace.ts file

Expected behavior:
It should do the same as it would with a workspaces file, but in the projects file instead.

Reproduction link

Reproduction steps

No response

System

-

Additional context

No response

@yannbf yannbf added addon: test bug internal-qa This issue was reported by the Storybook team, potentially on unreleased or prerelease software. needs triage labels Apr 15, 2025
@ghengeveld ghengeveld self-assigned this Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: test bug internal-qa This issue was reported by the Storybook team, potentially on unreleased or prerelease software. needs triage
Projects
None yet
Development

No branches or pull requests

2 participants