Simplifying the Test Structure
Learn to simplify the middleware test structure from the previous lesson.
We'll cover the following...
To avoid duplicating the test setup before every it()
clause, we can use Jest’s beforeEach()
method to combine the setup in one place: