Skip to content

How to test stories for custom React ErrorBoundary component #218

Open
@diginikkari

Description

@diginikkari

I'm trying to run smoke tests for stories including custom ErrorBoundary component.

When running storybook smoke tests. It is failing when there is story for ErrorBoundary with children throwing error.

Here is simple repro

Steps to reproduce:

  1. git clone https://github.com/diginikkari/test-runner-errorboundary-issue
  2. cd test-runner-errorboundary-issue
  3. yarn
  4. yarn storybook
  5. in second terminal: yarn test-storybook

Note!

When I used child component which throwed after mount (with useError) then it wasn't failing for the first story in the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglinear

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions