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

test: improve tests for unhandled rejections #4453

Merged
merged 2 commits into from
Aug 9, 2024
Merged

Conversation

nolanlawson
Copy link
Collaborator

Details

The current tests for #4451 and #3827 are somewhat janky – they occasionally log to the DevTools console which is very distracting.

Luckily I already had some code to capture unhandled rejections/errors, so I just extracted this into a general-purpose utility so that we can improve this test.

This is spun off from #4452 to avoid bloating that PR.

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.

@nolanlawson nolanlawson requested a review from a team as a code owner August 9, 2024 17:20
window.onerror = originalOnError;
});
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 99% copypasta from LightningElement.errorCallback/index.spec.js

@nolanlawson nolanlawson merged commit 1c02af1 into master Aug 9, 2024
11 checks passed
@nolanlawson nolanlawson deleted the nolan/issue-4451 branch August 9, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants