Skip to content

Commit

Permalink
Merge pull request #221 from storybookjs/docs/update-snapshot-recipe …
Browse files Browse the repository at this point in the history
…[skip ci]

Docs: add recipe for browser name
  • Loading branch information
yannbf committed Nov 16, 2022
2 parents 0403710 + 0fabe1c commit 6d41927
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -452,6 +452,8 @@ module.exports = {
expect.extend({ toMatchImageSnapshot });
},
async postRender(page, context) {
// If you want to take screenshot of multiple browsers, use
// page.context().browser().browserType().name() to get the browser name to prefix the file name
const image = await page.screenshot();
expect(image).toMatchImageSnapshot({
customSnapshotsDir,
Expand Down

0 comments on commit 6d41927

Please sign in to comment.