79781159

Date: 2025-10-02 17:23:25
Score: 0.5
Natty:
Report link

Thanks to @yurzui, the problem was with the:

spyOn(fakeVerificationSvc, "sendVerificationCode");

This prevents invoking the original method. To spy on the method and run it the .and.callThrough() must be used:

// IMPORTANT !!! => .and.callThrough();
spyOn(fakeVerificationSvc, "sendVerificationCode").and.callThrough();
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • User mentioned (1): @yurzui
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: AlexB