mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-28 18:26:15 +01:00
12 lines
480 B
TypeScript
12 lines
480 B
TypeScript
import { Decorator } from '@storybook/react'
|
|
import { inStorybookTestRunner } from 'lib/utils'
|
|
|
|
/** Workaround for https://github.com/storybookjs/test-runner/issues/74 */
|
|
// TODO: Smoke-test all the stories by removing this decorator, once all the stories pass
|
|
export const withSnapshotsDisabled: Decorator = (Story, { parameters }) => {
|
|
if (parameters?.testOptions?.skip && inStorybookTestRunner()) {
|
|
return <>Disabled for Test Runner</>
|
|
}
|
|
return <Story />
|
|
}
|