diff --git a/addons/interactions/src/preset/argsEnhancers.ts b/addons/interactions/src/preset/argsEnhancers.ts index d7a71ae9d9ef..d155bcce08ca 100644 --- a/addons/interactions/src/preset/argsEnhancers.ts +++ b/addons/interactions/src/preset/argsEnhancers.ts @@ -1,10 +1,12 @@ -import { Args, addons } from '@storybook/addons'; +import { addons } from '@storybook/addons'; +import type { Args } from '@storybook/addons'; +import { window as globalWindow } from 'global'; import { FORCE_REMOUNT, STORY_RENDER_PHASE_CHANGED } from '@storybook/core-events'; import { AnyFramework, ArgsEnhancer } from '@storybook/csf'; import { instrument } from '@storybook/instrumenter'; import { ModuleMocker } from 'jest-mock'; -const JestMock = new ModuleMocker(global); +const JestMock = new ModuleMocker(globalWindow); const fn = JestMock.fn.bind(JestMock); // Aliasing `fn` to `action` here, so we get a more descriptive label in the UI.