Testing · Senior · Question 24 of 75

Why does vi.mock need to be hoisted, and what follows from it?

Explanation

vi.hoisted lets you create values that are hoisted together with the mock.

Further reading

Problem with a question

Testing · Senior · question 24

Test yourself

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

Take this quiz