#Testing PRIVATE method through PUBLIC method
11 messages · Page 1 of 1 (latest)
g!rule4 @flint void
@flint void, please take a moment to go over our #rules. Do not send unsolicited Discord notifications. The use of @everyone and @here is strictly forbidden. Unsolicited direct messages (DMs), mentions, or friend requests are not allowed unless permission is granted in public channels. Replies to previous messages are allowed.
Don't call Angular lifecycle hooks yourself. The TestBed fixture will call them for you. Just check the results
This is part of a component or directive. You shouldn't test "methods", IMHO. You should test that the component behaves as it should behave.
I dont understand what that means
Should the component display some message or data or sub component? Then test that it displays the message or data or sub component.
it('should create Component', (): void => {
expect(component.contentHost) // ...
});
not sure myself, I didnt write the code
If you don't know what the component is supposed to do, then you're not the one who should be testing it.
I was just asked to test the private function by testing the public function that calls the private one