From ca1302152abffc47652937d7846e7068dbf2c879 Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Tue, 7 May 2024 17:24:36 +0100 Subject: [PATCH] Docs: Minor fixes to the testing snippets --- .../common/storybook-coverage-addon-config-options.ts.mdx | 2 +- docs/snippets/common/test-runner-image-snapshot-testing.js.mdx | 2 ++ docs/snippets/common/test-runner-waitpageready.js.mdx | 1 + docs/snippets/common/test-runner-waitpageready.ts.mdx | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/snippets/common/storybook-coverage-addon-config-options.ts.mdx b/docs/snippets/common/storybook-coverage-addon-config-options.ts.mdx index cf933c89f06a..b01135499e3a 100644 --- a/docs/snippets/common/storybook-coverage-addon-config-options.ts.mdx +++ b/docs/snippets/common/storybook-coverage-addon-config-options.ts.mdx @@ -13,7 +13,7 @@ const coverageConfig: AddonOptionsWebpack = { istanbul: { include: ['**/stories/**'], exclude: ['**/exampleDirectory/**'], - } + }, }; const config: StorybookConfig = { diff --git a/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx b/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx index b08405d1505c..d3fd40334eb1 100644 --- a/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx +++ b/docs/snippets/common/test-runner-image-snapshot-testing.js.mdx @@ -1,6 +1,8 @@ ```js // .storybook/test-runner.js +const { waitForPageReady } = require('@storybook/test-runner'); + const { toMatchImageSnapshot } = require('jest-image-snapshot'); const customSnapshotsDir = `${process.cwd()}/__snapshots__`; diff --git a/docs/snippets/common/test-runner-waitpageready.js.mdx b/docs/snippets/common/test-runner-waitpageready.js.mdx index 1bb3df563c00..42e1f36d3338 100644 --- a/docs/snippets/common/test-runner-waitpageready.js.mdx +++ b/docs/snippets/common/test-runner-waitpageready.js.mdx @@ -2,6 +2,7 @@ // .storybook/test-runner.js const { waitForPageReady } = require('@storybook/test-runner'); + const { toMatchImageSnapshot } = require('jest-image-snapshot'); const customSnapshotsDir = `${process.cwd()}/__snapshots__`; diff --git a/docs/snippets/common/test-runner-waitpageready.ts.mdx b/docs/snippets/common/test-runner-waitpageready.ts.mdx index 2da14b2c7185..d017273d9f96 100644 --- a/docs/snippets/common/test-runner-waitpageready.ts.mdx +++ b/docs/snippets/common/test-runner-waitpageready.ts.mdx @@ -2,6 +2,7 @@ // .storybook/test-runner.ts import type { TestRunnerConfig } from '@storybook/test-runner'; + import { waitForPageReady } from '@storybook/test-runner'; import { toMatchImageSnapshot } from 'jest-image-snapshot';