Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

This package is deprecated as it is a core functionality of Storybook 7! #143

Open
yannbf opened this issue Apr 21, 2023 · 0 comments
Open

Comments

@yannbf
Copy link
Member

yannbf commented Apr 21, 2023

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:

  1. Upgrade to Storybook 7 or 8 if you haven't already
  2. Uninstall @storybook/testing-react
  3. 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!

@yannbf yannbf pinned this issue Apr 21, 2023
@yannbf yannbf changed the title This package is now deprecated! It's now a core functionality of Storybook 7. This package is deprecated as it is a core functionality of Storybook 7! Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant