Testing · Junior · Question 31 of 78

What does jest.fn() / vi.fn() create?

Explanation

Typical use: pass it as a callback prop and check that it was called.

Further reading

Problem with a question

Testing · Junior · question 31

Test yourself

Take the Testing · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz