Skip to content

Commit

Permalink
add skip snapshots for internal example
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Aug 18, 2022
1 parent 686132c commit 1f73266
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .storybook/test-runner.ts
Expand Up @@ -4,6 +4,7 @@ import type { TestRunnerConfig } from '../dist/ts';

const snapshotsDir = process.env.SNAPSHOTS_DIR || '__snapshots__';
const customSnapshotsDir = `${process.cwd()}/${snapshotsDir}`;
const skipSnapshots = process.env.SKIP_SNAPSHOTS === 'true';

const config: TestRunnerConfig = {
setup() {
Expand All @@ -17,6 +18,10 @@ const config: TestRunnerConfig = {
return;
}

if (skipSnapshots) {
return;
}

// Visual snapshot tests
const image = await page.screenshot({ fullPage: true });
expect(image).toMatchImageSnapshot({
Expand Down

0 comments on commit 1f73266

Please sign in to comment.