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

ref(angular): Add more tests to the error handler #6445

Merged
merged 6 commits into from
Dec 16, 2022

Conversation

theofidry
Copy link
Contributor

@theofidry theofidry commented Dec 6, 2022

Add more tests to cover the problematic paths mentioned in #6332.

@theofidry theofidry changed the title ref(angular): Add more tests to the error handler Draft: ref(angular): Add more tests to the error handler Dec 6, 2022
@theofidry theofidry changed the title Draft: ref(angular): Add more tests to the error handler ref(angular): Add more tests to the error handler Dec 6, 2022
@AbhiPrasad AbhiPrasad added the Package: angular Issues related to the Sentry Angular SDK label Dec 7, 2022
packages/angular/test/errorhandler.test.ts Outdated Show resolved Hide resolved
packages/angular/test/errorhandler.test.ts Outdated Show resolved Hide resolved
expect(captureExceptionSpy).toHaveBeenCalledWith('Handled unknown error', expect.any(Function));
});

it('handleError method extracts ErrorEvent which has an error has an error', () => {
Copy link

Choose a reason for hiding this comment

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

Suggested change
it('handleError method extracts ErrorEvent which has an error has an error', () => {
it('handleError method extracts ErrorEvent which has an error as an error', () => {

packages/angular/test/errorhandler.test.ts Outdated Show resolved Hide resolved
Co-authored-by: hunhejj <hunhejj@gmail.com>
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Hi @theofidry, thanks for adding these tests! Seems like a bunch of cases we have now covered. Appreciate the help!

packages/angular/test/errorhandler.test.ts Outdated Show resolved Hide resolved
@Lms24 Lms24 merged commit d144d12 into getsentry:master Dec 16, 2022
@Lms24
Copy link
Member

Lms24 commented Dec 16, 2022

Thanks for adding these tests @theofidry. Will take a look at your next PR soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: angular Issues related to the Sentry Angular SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants