Skip to content
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

[Bug]: @storybook/test using pinned @vitest/expect, could lead to expect.extend mismatch #30779

Open
unional opened this issue Mar 9, 2025 · 1 comment

Comments

@unional
Copy link
Contributor

unional commented Mar 9, 2025

Describe the bug

Storybook + Vitest integration supports Vitest v3, but individual packages like @storybook/test is using a pinned version for Vitest dependency:

// @storybook/test/package.json
{
  "dependencies": {
    "@vitest/expect": "2.0.5",
    "@vitest/spy": "2.0.5"
  }
}

Reproduction link

n/a atm

Reproduction steps

No response

System

n/a

Additional context

No response

Copy link
Contributor

greptile-apps bot commented Mar 9, 2025

** Disclaimer** This information might be inaccurate, due to it being generated automatically
This can be fixed by updating the dependencies in @storybook/test package.json to use a more flexible version range that aligns with Vitest v3 support: diff // @storybook/test/package.json { "dependencies": { - "@vitest/expect": "2.0.5", - "@vitest/spy": "2.0.5" + "@vitest/expect": "^2.0.0 || ^3.0.0", + "@vitest/spy": "^2.0.0 || ^3.0.0" } } This will allow compatibility with both Vitest v2 and v3 while maintaining the functionality of expect.extend.

About Greptile

This response provides a starting point for your research, not a precise solution.

Help us improve! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

Edit Issue Bot Settings · Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant