Skip to content

Commit

Permalink
expect >= 1 assertion in storyshots puppeteer test
Browse files Browse the repository at this point in the history
  • Loading branch information
kahirokunn committed Oct 4, 2020
1 parent dfb1515 commit 8401a48
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -11,6 +11,7 @@ export const imageSnapshot = (customConfig: Partial<ImageSnapshotConfig> = {}) =
return puppeteerTest({
...config,
async testBody(page, options) {
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 8401a48

Please sign in to comment.