@@ -4,7 +4,6 @@ import { fluentDecorator, globalTypes as fluentGlobalTypes } from "./fluentDecor
44import { withI18n , globalTypes as i18nGlobalTypes } from "./i18nDecorator" ;
55import { initialize , mswLoader } from "msw-storybook-addon" ;
66import MockDate from "mockdate" ;
7- import type { TestParameters } from "@storybook/addon-vitest" ;
87import type { A11yParameters } from "@storybook/addon-a11y" ;
98
109initialize ( ) ;
@@ -13,6 +12,17 @@ configure({
1312 asyncUtilTimeout : 2000 ,
1413} ) ;
1514
15+ // copied from https://github.com/storybookjs/storybook/blob/da8cf2095bfde31267c11652a5f18deb4c48e192/code/core/src/test/preview.ts#L132
16+ interface TestParameters {
17+ test ?: {
18+ /** Ignore unhandled errors during test execution */
19+ dangerouslyIgnoreUnhandledErrors ?: boolean ;
20+
21+ /** Whether to throw exceptions coming from the play function */
22+ throwPlayFunctionExceptions ?: boolean ;
23+ } ;
24+ }
25+
1626const preview : Preview = {
1727 parameters : {
1828 test : {
@@ -28,8 +38,8 @@ const preview: Preview = {
2838 } ,
2939 } ,
3040 } ,
31- } ,
32- } satisfies TestParameters & A11yParameters ,
41+ } satisfies A11yParameters ,
42+ } satisfies TestParameters & { a11y : A11yParameters } ,
3343 globalTypes : { ...fluentGlobalTypes , ...i18nGlobalTypes } ,
3444 initialGlobals : {
3545 theme : "light" ,
0 commit comments