Computer Science, asked by viniee9415, 1 year ago

Is useful when you want to mock functions in certain test cases and restore the original implementation in others.

Answers

Answered by abhinavkashyap55
5

Mock functions are also known as "spies", because they let you spy on the behavior of a function that is called indirectly by some other code, rather than just testing the output. You can create a mock function with jest.fn(). If no implementation is given, the mock function will return undefined when invoked.

Answered by arinrodelkai
0

Answer:

mock reset()

Explanation:

every answer will be in

Google. go and grab ur ans.

Similar questions