Skip to content

Commit

Permalink
Merge pull request #69 from storybooks/storybook-context
Browse files Browse the repository at this point in the history
Provide storybook context to render
  • Loading branch information
arunoda authored Dec 27, 2016
2 parents 8451839 + a58fe9a commit fba1264
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export default function testStorySnapshots (options = {}) {
describe(group.kind, () => {
for (const story of group.stories) {
it(story.name, () => {
const renderedStory = story.render()
const context = { kind: group.kind, story: story.name }
const renderedStory = story.render(context)
const tree = renderer.create(renderedStory).toJSON()
expect(tree).toMatchSnapshot()
})
Expand Down

0 comments on commit fba1264

Please sign in to comment.