Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request]: Respect dangerouslyIgnoreUnhandledErrors #482

Closed
IanVS opened this issue Jun 11, 2024 · 3 comments
Closed

[Feature request]: Respect dangerouslyIgnoreUnhandledErrors #482

IanVS opened this issue Jun 11, 2024 · 3 comments
Labels
feature request New feature or request needs triage

Comments

@IanVS
Copy link
Member

IanVS commented Jun 11, 2024

Is your feature request related to a problem? Please describe.

I have a test that simulates a 500 error from the server, and shows that we handle it with an error boundary in our app. The story fails in the interaction test, however, so I added the suggested test.dangerouslyIgnoreUnhandledErrors parameter, which makes it green in the browser, but the test still fails in CI due to the test-runner seemingly not respecting it.

Describe the solution you'd like

Tests should not fail due to unhandled errors if dangerouslyIgnoreUnhandledErrors is set.

Describe alternatives you've considered

I can also disable the test and use a chromatic snapshot to validate that the correct screen is shown, which is what I'll do as a workaround for now.

Are you able to assist to bring the feature to reality?

yes, I can

Additional context

I marked yes i can above, but it's more of a "maybe". :-D

@IanVS IanVS added feature request New feature or request needs triage labels Jun 11, 2024
@yannbf
Copy link
Member

yannbf commented Jun 20, 2024

Hey @IanVS as we spoke before, I was not able to reproduce this issue. The test-runner is not aware of that option because it doesn't have to, as it just listens to events from Storybook. So if your option is set, then Storybook should not emit the event to the test-runner

@IanVS
Copy link
Member Author

IanVS commented Jun 20, 2024

Thanks for the reminder, I'll try to figure out what was happening.

@IanVS
Copy link
Member Author

IanVS commented Jun 20, 2024

Sure enough, I can no longer reproduce the issue I was seeing before. I have a test that fails without dangerouslyIgnoreUnhandledErrors, both in test-runner and the UI, and it passes in both spots when I enable the flag. Something else must have been erroring before. Sorry for the false alarm!

@IanVS IanVS closed this as completed Jun 20, 2024
@IanVS IanVS closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request needs triage
Projects
None yet
Development

No branches or pull requests

2 participants