mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 18:31:08 +08:00
Merge pull request #17614 from storybookjs/jest-mock-global-this
Addon-interactions: Use 'global' package instead of `global`
This commit is contained in:
commit
761501bf13
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user