Why does jest not call my mock implementation

After a lot of head scratching and trying to figure out how to get the VS Code debugger to step through a Jest test, I finally tracked this down to something quite simple.

I didn’t mock setRequestHeader, which caused my class to throw an exception before the send method was called.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top