-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[#12588] Added unit tests for ErrorReportComponent #12610
[#12588] Added unit tests for ErrorReportComponent #12610
Conversation
Hi @u7488099, thank you for your interest in contributing to TEAMMATES!
Please address the above before we proceed to review your PR. |
Ready for review |
it('should inject ErrorReportService and NgbActiveModal', () => { | ||
const errorReportService = (component as any).errorReportService; | ||
const ngbActiveModal = (component as any).ngbActiveModal; | ||
|
||
expect(errorReportService).toBeTruthy(); | ||
expect(ngbActiveModal).toBeTruthy(); | ||
}); |
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.
let's remove this test as it's using type assertions (component as any) to access private properties of the component, which is not a recommended practice because it breaks encapsulation, and moreover, we are already testing these 2 services indirectly through the public methods of the classs
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.
a small change, otherwise lgtm!
The test has been removed |
Ready for review |
Ready for review |
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.
LGTM, thank you for your contribution!
Folks, This PR seems to be stalling (no activities for the past 7 days). 🐌 😢 |
1 similar comment
Folks, This PR seems to be stalling (no activities for the past 7 days). 🐌 😢 |
Folks, This PR seems to be stalling (no activities for the past 8 days). 🐌 😢 |
Folks, This PR seems to be stalling (no activities for the past 9 days). 🐌 😢 |
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.
LGTM
…S#12610) * [TEAMMATES#12588] Added unit tests for ErrorReportComponent * [TEAMMATES#12588] Added unit tests for ErrorReportComponent * [TEAMMATES#12588] Added unit tests for ErrorReportComponent * [TEAMMATES#12588] Added unit tests for ErrorReportComponent * [TEAMMATES#12588] Fixed Added unit tests for ErrorReportComponent --------- Co-authored-by: Wei Qing <[email protected]>
Fixes [#12588]
Outline of Solution
Add unit tests for ErrorReportComponent