mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-12 00:14:58 +08:00
Fix types in a couple of angular tests
This commit is contained in:
parent
eb8ea01f87
commit
26f83f56c9
@ -154,7 +154,7 @@ describe('decorateStory', () => {
|
|||||||
];
|
];
|
||||||
const decorated = decorateStory(() => ({ template: '</child>' }), decorators);
|
const decorated = decorateStory(() => ({ template: '</child>' }), decorators);
|
||||||
|
|
||||||
expect(decorated()).toEqual({
|
expect(decorated(makeContext({}))).toEqual({
|
||||||
template:
|
template:
|
||||||
'<great-grandparent><grandparent><parent></child></parent></grandparent></great-grandparent>',
|
'<great-grandparent><grandparent><parent></child></parent></grandparent></great-grandparent>',
|
||||||
userDefinedTemplate: true,
|
userDefinedTemplate: true,
|
||||||
@ -220,7 +220,7 @@ describe('decorateStory', () => {
|
|||||||
];
|
];
|
||||||
const decorated = decorateStory(() => ({ component: FooComponent }), decorators);
|
const decorated = decorateStory(() => ({ component: FooComponent }), decorators);
|
||||||
|
|
||||||
expect(decorated()).toEqual({
|
expect(decorated(makeContext({}))).toEqual({
|
||||||
template:
|
template:
|
||||||
'<great-grandparent><grandparent><parent><foo></foo></parent></grandparent></great-grandparent>',
|
'<great-grandparent><grandparent><parent><foo></foo></parent></grandparent></great-grandparent>',
|
||||||
component: FooComponent,
|
component: FooComponent,
|
||||||
@ -288,7 +288,7 @@ describe('decorateStory', () => {
|
|||||||
];
|
];
|
||||||
const decorated = decorateStory(() => ({ props: { a: [0] } }), decorators);
|
const decorated = decorateStory(() => ({ props: { a: [0] } }), decorators);
|
||||||
|
|
||||||
expect(decorated()).toEqual({ props: { a: [0, 1, 2, 3] } });
|
expect(decorated(makeContext({}))).toEqual({ props: { a: [0, 1, 2, 3] } });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('passes context through to sub decorators', () => {
|
it('passes context through to sub decorators', () => {
|
||||||
|
@ -120,7 +120,7 @@ describe('moduleMetadata', () => {
|
|||||||
|
|
||||||
const [storybook] = getStorybook();
|
const [storybook] = getStorybook();
|
||||||
|
|
||||||
expect(storybook.stories[0].render().moduleMetadata).toEqual({
|
expect(storybook.stories[0].render({}).moduleMetadata).toEqual({
|
||||||
declarations: [MockComponent],
|
declarations: [MockComponent],
|
||||||
providers: [MockService],
|
providers: [MockService],
|
||||||
entryComponents: [MockComponent],
|
entryComponents: [MockComponent],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user