You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 31, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ You are using [Storybook](https://storybook.js.org/) for you components and writ
12
12
13
13
## The solution
14
14
15
-
`@storybook/react-testing` is a solution to reuse your Storybook stories in your React tests. By reusing your stories in your tests, you have a catalog of component scenarios ready to be tested. All [args](https://storybook.js.org/docs/react/writing-stories/args) and [decorators](https://storybook.js.org/docs/react/writing-stories/decorators) from your [story](https://storybook.js.org/docs/react/api/csf#named-story-exports) and its [meta](https://storybook.js.org/docs/react/api/csf#default-export), and also [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), will be composed by this library and returned to you in a simple component. This way, in your unit tests, all you have to do is select which story you want to render, and all the necessary setup will be already done for you. This is the missing piece that allows for better shareability and maintenance between writing tests and writing Storybook stories.
15
+
`@storybook/testing-react` is a solution to reuse your Storybook stories in your React tests. By reusing your stories in your tests, you have a catalog of component scenarios ready to be tested. All [args](https://storybook.js.org/docs/react/writing-stories/args) and [decorators](https://storybook.js.org/docs/react/writing-stories/decorators) from your [story](https://storybook.js.org/docs/react/api/csf#named-story-exports) and its [meta](https://storybook.js.org/docs/react/api/csf#default-export), and also [global decorators](https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators), will be composed by this library and returned to you in a simple component. This way, in your unit tests, all you have to do is select which story you want to render, and all the necessary setup will be already done for you. This is the missing piece that allows for better shareability and maintenance between writing tests and writing Storybook stories.
16
16
17
17
## Installation
18
18
@@ -21,13 +21,13 @@ This library should be installed as one of your project's `devDependencies`:
21
21
via [npm](https://www.npmjs.com/)
22
22
23
23
```
24
-
npm install --save-dev @storybook/react-testing
24
+
npm install --save-dev @storybook/testing-react
25
25
```
26
26
27
27
or via [yarn](https://classic.yarnpkg.com/)
28
28
29
29
```
30
-
yarn add --dev @storybook/react-testing
30
+
yarn add --dev @storybook/testing-react
31
31
```
32
32
33
33
## Setup
@@ -69,7 +69,7 @@ If you use the composed story (e.g. PrimaryButton), the component will render wi
0 commit comments