diff --git a/src/index.js b/src/index.js index fd8021d..1952458 100644 --- a/src/index.js +++ b/src/index.js @@ -62,7 +62,7 @@ export default function testStorySnapshots (options = {}) { it(story.name, () => { const context = { kind: group.kind, story: story.name } const renderedStory = story.render(context) - const tree = renderer.create(renderedStory).toJSON() + const tree = renderer.create(renderedStory, options.rendererOptions).toJSON() expect(tree).toMatchSnapshot() }) } diff --git a/stories/__test__/__snapshots__/storyshots.test.js.snap b/stories/__test__/__snapshots__/storyshots.test.js.snap index c02481b..66bb94f 100644 --- a/stories/__test__/__snapshots__/storyshots.test.js.snap +++ b/stories/__test__/__snapshots__/storyshots.test.js.snap @@ -70,6 +70,23 @@ exports[`Storyshots Button with text 1`] = ` `; +exports[`Storyshots Component with ref on mount 1`] = ` + +`; + exports[`Storyshots Welcome to Storybook 1`] = `