Fix types in a couple of angular tests

This commit is contained in:
Tom Coleman 2021-09-08 00:30:52 +10:00
parent eb8ea01f87
commit 26f83f56c9
2 changed files with 4 additions and 4 deletions

View File

@ -154,7 +154,7 @@ describe('decorateStory', () => {
];
const decorated = decorateStory(() => ({ template: '</child>' }), decorators);
expect(decorated()).toEqual({
expect(decorated(makeContext({}))).toEqual({
template:
'<great-grandparent><grandparent><parent></child></parent></grandparent></great-grandparent>',
userDefinedTemplate: true,
@ -220,7 +220,7 @@ describe('decorateStory', () => {
];
const decorated = decorateStory(() => ({ component: FooComponent }), decorators);
expect(decorated()).toEqual({
expect(decorated(makeContext({}))).toEqual({
template:
'<great-grandparent><grandparent><parent><foo></foo></parent></grandparent></great-grandparent>',
component: FooComponent,
@ -288,7 +288,7 @@ describe('decorateStory', () => {
];
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', () => {

View File

@ -120,7 +120,7 @@ describe('moduleMetadata', () => {
const [storybook] = getStorybook();
expect(storybook.stories[0].render().moduleMetadata).toEqual({
expect(storybook.stories[0].render({}).moduleMetadata).toEqual({
declarations: [MockComponent],
providers: [MockService],
entryComponents: [MockComponent],