[addon-storyshots] Warning: DeprecationWarning: \storyFn\
is deprecated and will be removed in Storybook 7.0 appears in all storyshots on version 6.1.16
#13815
Labels
Describe the bug
A warning is being shown when using initSnapshots with jest with the following message: Warning: DeprecationWarning: `storyFn` is deprecated and will be removed in Storybook 7.0.
With this link as helping message: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-storyfn
Doing a bit of research, I detected this is due to how story.render method is being set by the storyshots addon. It seems that this method is set to story.storyFn instead of the newer API, story.unboundStoryFn. And when story is rendered, that method is executed generating this warning.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No deprecation warning should appear when running initSnapshots if stories are alright.
Code snippets
System
Environment Info:
Additional context
Let me know if there's something missing in this bug report and if it is necessary to provide more context. I'm open to help with what I can.
I would also highly recommend start checking here: https://github.com/storybookjs/storybook/blob/next/addons/storyshots/storyshots-core/src/api/index.ts#L61
Where this render = storyFn is set.
The text was updated successfully, but these errors were encountered: