From adbb6a24e923eb70b749efa5631ceb1bd9bec92d Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 2 Mar 2022 16:04:45 -0500 Subject: [PATCH] [addon-interactions] Use 'global' package instead of `global` --- addons/interactions/src/preset/argsEnhancers.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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.