Answer the question
In order to leave comments, you need to log in
How to make a mock function that is imported directly, and not as an object method (JEST)?
A function that is a method of an object is substituted through jest.spyOn.
How to mock a function that is directly imported and can be called directly in the function under test?
Answer the question
In order to leave comments, you need to log in
Through jest.mock . A module is passed that needs to be locked and then some basic implementation of this module.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question