Comments (2)
I just found a workaround. It seems that this error only happens with composeStories
if I use composeStory
the error does not occur.
from testing-react.
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 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';
For now, I'll be closing this issue. Please, if even after migrating, you are still experiencing issues, report them in the Storybook monorepo.
Thank you so much for this journey!
from testing-react.
Related Issues (20)
- @storybook/preview-web stops exporting WebProjectAnnotations at 6.5.0 HOT 8
- `name` is changed when composing stories HOT 1
- Expose types HOT 1
- `StoryContext.title` Is Always An Empty String HOT 1
- What is the TypeScript return type of within()? HOT 2
- Using setGlobalConfig remove window global overrides from test setup HOT 2
- Types unknown, not read by Jest HOT 4
- Default import from `@storybook/addons` breaks in `[email protected]` HOT 1
- Storybook 7.0 alpha.44 removed defaultDecorateStory, breaks testing-react HOT 3
- Run test failed TypeError: Super expression must either be null or a function HOT 3
- Storybook preview hooks can only be called inside decorators and story functions
- `play` with `composeStories` throws type error on @next HOT 2
- Nextjs decorators support HOT 3
- Use the new Framework API HOT 2
- Testing Modals HOT 4
- Mocking UUIDs HOT 1
- This package is deprecated as it is a core functionality of Storybook 7!
- How to capture arguments to an action
- Wrong decorator order HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from testing-react.