Testing · Junior · Question 22 of 78

What is beforeEach used for?

Explanation

For one-time setup there is beforeAll; for cleanup - afterEach and afterAll.

Further reading

Problem with a question

Testing · Junior · question 22

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