Skip to content

[storybook] componentWrapperDecorator broken in vitest #2074

@prclm

Description

@prclm

Please provide the environment you discovered this bug in.

brandonroberts/angular-vite-storybook@main...prclm:angular-vite-storybook:decorators-bug

I reproduced the bug in the fork of brandonroberts/angular-vite-storybook.

Which area/package is the issue in?

vitest-angular

Description

I don't know where the bug is actually happening. Could also be in the "@storybook/addon-vitest" package.

When rendering a story in vitest, that is wrapped with a componentWrapperDecorator, the decorator function does not receive the story, but "undefined". And then it renders the decorator with the text "undefined" inside, not the story.

Please provide the exception or error you saw


Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions