Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Jun 12, 2023
1 parent 85c43eb commit 6bdec4c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions code/lib/preview-api/src/modules/core-client/start.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,16 @@ jest.mock('@storybook/global', () => ({
},
}));

// console.log(global);
jest.mock('@storybook/channels', () => {
function Channel(this: typeof emitter) {
this.on = mockChannel.on;
this.off = mockChannel.off;
this.removeListener = mockChannel.off;
this.emit = mockChannel.emit;
}

jest.mock('@storybook/channel-postmessage', () => ({ createChannel: () => mockChannel }));
return { Channel };
});
jest.mock('@storybook/client-logger');
jest.mock('react-dom');

Expand Down

0 comments on commit 6bdec4c

Please sign in to comment.