Skip to content

Commit

Permalink
Merge pull request #12657 from kahirokunn/feature/storyshots
Browse files Browse the repository at this point in the history
Storyshots Puppeteer: Fix support for over 1 assertions in async tests
  • Loading branch information
shilman committed Oct 4, 2020
2 parents fd017c6 + 8401a48 commit 870c4db
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -11,7 +11,7 @@ export const imageSnapshot = (customConfig: Partial<ImageSnapshotConfig> = {}) =
return puppeteerTest({
...config,
async testBody(page, options) {
expect.assertions(1);
expect.hasAssertions();
const element = await beforeScreenshot(page, options);
const image = await (element || page).screenshot(getScreenshotOptions(options));
await afterScreenshot({ image, context: options.context });
Expand Down

0 comments on commit 870c4db

Please sign in to comment.