mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 05:21:48 +08:00
Fix tests
(The order of `SET_STORIES` and `STORY_RENDERED` swapped)
This commit is contained in:
parent
f8d993677c
commit
a02b2c7f4c
@ -62,7 +62,7 @@ describe('start', () => {
|
||||
.add('Story Three', jest.fn());
|
||||
});
|
||||
|
||||
await waitForEvents([Events.SET_STORIES]);
|
||||
await waitForRender();
|
||||
expect(
|
||||
mockChannel.emit.mock.calls.find((call: [string, any]) => call[0] === Events.SET_STORIES)[1]
|
||||
).toMatchInlineSnapshot(`
|
||||
@ -273,7 +273,7 @@ describe('start', () => {
|
||||
clientApi.storiesOf('Component C', { id: 'file1' } as NodeModule).add('default', jest.fn());
|
||||
});
|
||||
|
||||
await waitForEvents([Events.SET_STORIES]);
|
||||
await waitForRender();
|
||||
|
||||
expect(mockChannel.emit).toHaveBeenCalledWith(Events.STORY_RENDERED, 'component-a--default');
|
||||
|
||||
@ -585,7 +585,7 @@ describe('start', () => {
|
||||
const { configure } = start(render);
|
||||
configure('test', () => [componentCExports]);
|
||||
|
||||
await waitForEvents([Events.SET_STORIES]);
|
||||
await waitForRender();
|
||||
expect(
|
||||
mockChannel.emit.mock.calls.find((call: [string, any]) => call[0] === Events.SET_STORIES)[1]
|
||||
).toMatchInlineSnapshot(`
|
||||
@ -956,7 +956,7 @@ describe('start', () => {
|
||||
return [componentCExports];
|
||||
});
|
||||
|
||||
await waitForEvents([Events.SET_STORIES]);
|
||||
await waitForRender();
|
||||
expect(
|
||||
mockChannel.emit.mock.calls.find((call: [string, any]) => call[0] === Events.SET_STORIES)[1]
|
||||
).toMatchInlineSnapshot(`
|
||||
|
Loading…
x
Reference in New Issue
Block a user