You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see a few issues with the current mocking situation:
Transparent mocking via __mocks__ is picked up by both Jest and Storybook
This avoids config, but if a mock uses jest.fn, then Storybook fails
Such files have to export everything we used, not just whatever we want to override
Inline mocking via jest.mock + callback
This allows partial mocks, but is relatively verbose both in declaration and in usage (import module, call jest.mock, then use (module.fn as any).mockResolvedValue() every time)
I see a few issues with the current mocking situation:
__mocks__
is picked up by both Jest and Storybookjest.fn
, then Storybook fails(module.fn as any).mockResolvedValue()
every time)pixiebrix-extension/src/runtime/pipelineTests/trace.test.ts
Lines 41 to 56 in 56a43d7
Possible solutions (discuss)
The text was updated successfully, but these errors were encountered: