Storyshot shallow rendering with decorators
See original GitHub issueDescribe the bug When shallow rendering with decorators the snapshot generated is useless. For example:
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Storyshots Components|Avatar default 1`] = `
<StoryRouter
story={[Function]}
/>
`;
To Reproduce Steps to reproduce the behavior:
- Create a story
- Configure storyshots to use shallow rendering
- Configure storyshots to use a decorator, (e.g. https://github.com/gvaldambrini/storybook-router)
Expected behavior The snapshot contains the serialized component being tested.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Storyshots Addon | Storybook: Frontend workshop for UI ...
Take a snapshot of a shallow-rendered version of the component. Note that this option will be overridden if you pass a renderer option....
Read more >Technical & Organizational Benefits of Storybook Snapshot ...
Use shallow rendering to avoid large snapshots that are prone to breakage; Run StoryShots tests separate from your other tests ...
Read more >How to test decorated React component with shallow rendering
You can't. First let's slightly desugar the decorator: let PlayerProfile = withMUI( class PlayerProfile extends React.Component { // .
Read more >React Native Storybook + Generating individual test files to ...
Storyshots works by taking a snapshot (via jest + enzyme shallow render) of each of your stories automatically. To set up storybook and ......
Read more >provide better example for async snapshot testing #7745
import initStoryshots, { Stories2SnapsConverter } from "@storybook/addon-storyshots"; import { shallow, mount } from "enzyme"; import { act } from ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ewolfe Aha sorry about that. Reopening!
Hey there, it’s me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!