mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
Add assertions to left_panel.test.js
This commit is contained in:
parent
17fb4f5c41
commit
87adce4746
@ -87,6 +87,13 @@ describe('manager.ui.containers.left_panel', () => {
|
||||
stories[0], // selected kind is always there. That's why this is here.
|
||||
stories[1],
|
||||
]);
|
||||
|
||||
expect(result.storiesHierarchy.map).toEqual(
|
||||
new Map([
|
||||
['pk', [{ ...stories[0], name: 'pk', namespaces: ['pk'] }]], // selected kind is always there. That's why this is here.
|
||||
['ss', [{ ...stories[1], name: 'ss', namespaces: ['ss'] }]],
|
||||
])
|
||||
);
|
||||
});
|
||||
|
||||
test('should filter and sort stories according to the given filter', () => {
|
||||
@ -131,6 +138,13 @@ describe('manager.ui.containers.left_panel', () => {
|
||||
stories[1], // selected kind is always there. That's why this is here.
|
||||
stories[0],
|
||||
]);
|
||||
|
||||
expect(result.storiesHierarchy.map).toEqual(
|
||||
new Map([
|
||||
['pk', [{ ...stories[1], name: 'pk', namespaces: ['pk'] }]], // selected kind is always there. That's why this is here.
|
||||
['ss', [{ ...stories[0], name: 'ss', namespaces: ['ss'] }]],
|
||||
])
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user