-
Notifications
You must be signed in to change notification settings - Fork 1
Migrate to ng-mock
#883
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
Migrate to ng-mock
#883
Conversation
555318f to
245fe0f
Compare
08b325a to
c3c009b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #883 +/- ##
==========================================
+ Coverage 47.10% 47.75% +0.65%
==========================================
Files 372 351 -21
Lines 11495 11292 -203
Branches 1914 1889 -25
==========================================
- Hits 5415 5393 -22
+ Misses 5896 5709 -187
- Partials 184 190 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
It passes! I'm going to have Claude attempt to organize things into better clumps of commits that we can review in pieces, and then it's possible would still want to squash them into changes. |
c3c009b to
804017f
Compare
aasandei-vsp
left a comment
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.
I ran the tests locally after an npm install and everything passed. Tests look better than before, so it's definitely a step forward.
| ngMocks.globalKeep(NgbDropdownModule); | ||
| ngMocks.globalKeep(NgbPaginationModule); | ||
| ngMocks.globalKeep(CountUpDirective); | ||
| ngMocks.globalKeep(CountUpModule); |
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.
I wonder why we are not mocking these too.
We were using a library called `shallow-render` to help with mocking angular components for our tests. That library is not maintained by a large community, and was falling behind major angular updates. `ng-mocks` is a much more popular library for angular testing. It also provides more functionality beyond just shallow component mocking. Issue #879 Remove shallow-render dependency Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
804017f to
b9cea03
Compare
This PR removes our use of
shallow-renderand replaces it withng-mockwhich is a commonly used mocking library with more community support.This is an extensive set of changes, so it's broken into smaller parts for easier review; ultimately, however, we will want to squash the commits into a single migration commit.
Resolves #879