Replies: 1 comment
-
This is resolved in 7.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
When importing stories and writing tests, I was importing
composeStories
from@storybook/react
instead of@storybook/testing-react
. Then I got the following type error in running play function of the composed story.undefined
.{ canvasElement: container }
is missing some properties.code:
I do not get this error if I use
composeStories
imported from@storybook/testing-react
as described in this document. I thought thecomposeStories
function in@storybook/react
should work as well and the type error is a bug, for the following reasons:@storybook/react
composeStory
in@storybook/react
works well@storybook/testing-react
and@storybook/react
's one are similarFrom the source code of
@storybook/testing-react
, it is thought that type errors can be eliminated by changing /lib/store/src/csf/testing-utils/index.ts as follows.So I have two questions
composeStories
of@storybook/testing-react
and@storybook/react
different?@storybook/react
'scomposeStories
?This is my environment:
@storybook/react
: 6.5.12@storybook/testing-react
: 1.3.0Thanks.
Beta Was this translation helpful? Give feedback.
All reactions