Skip to content

Commit

Permalink
Merge pull request #17614 from storybookjs/jest-mock-global-this
Browse files Browse the repository at this point in the history
Addon-interactions: Use 'global' package instead of `global`
  • Loading branch information
yannbf authored Mar 2, 2022
2 parents 5e275b3 + adbb6a2 commit 761501b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addons/interactions/src/preset/argsEnhancers.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 761501b

Please sign in to comment.