-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
test(angular): Increase Angular SDK test coverage. #5790
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
Conversation
ef7cde4
to
e684b43
Compare
size-limit report 📦
|
e684b43
to
ed5c1ef
Compare
ed5c1ef
to
8db2e15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks @onurtemizkan for adding Angular tests! This has been on my Angular SDK ToDo list for quite a while. Also, great that you figured out a way to get TestBed
working. I tried a bunch of stuff when I was adding the router parameterization tests but didn't get it working and tabled it for "later".
I still had some questions and suggestions but overall I think we can merge this soon.
1a9f33e
to
542da5b
Compare
542da5b
to
4232304
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing my feedback! 🚀
Resolves: #4143
This PR increases unit test coverage of Angular SDK by integrating
TestBed
.The main work here is done on
tracing.ts
which had low test coverage, and the previous tests were faking the angular router.I attempted to use
@testing-library/angular
to be consistent with other SDK tests like@sentry/react
and@sentry/svelte
, but it was not possible as it doesn't support renders without compiled components which we need while testingTraceService
.Coverage before:
Coverage after: