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