This package is deprecated as it is a core functionality of Storybook 7! #143
Description
Hey there! I wanted to thank you for using @storybook/testing-react!
@storybook/testing-react
has been promoted to a first-class Storybook functionality in Storybook 7. This means that you no longer need this package, and this package will not be worked on anymore (especially regarding Storybook 6, unless there are security issues). Instead, you can import the same utilities, but from the @storybook/react
package. Additionally, the internals of composeStories
and composeStory
have been revamped, so the way a story is composed is way more accurate, and it's possible this issue doesn't happen there anymore.
Please do the following:
- Upgrade to Storybook 7 or 8 if you haven't already
- Uninstall
@storybook/testing-react
- Update your imports from
@storybook/testing-react
to@storybook/react
// Component.test.jsx
- import { composeStories } from '@storybook/testing-react';
+ import { composeStories } from '@storybook/react';
// setup-files.js
- import { setProjectAnnotations } from '@storybook/testing-react';
+ import { setProjectAnnotations } from '@storybook/react';
Please, if even after migrating, you are still experiencing issues, report them in the Storybook monorepo.
Thank you so much for this journey!