Dec 10, 2020
Great guide, saved precious time.
To anyone trying to DRY this up, you can't put it a `beforeEach` clause. Jest will cache the last value the mock returned. Turns out `mockImplementation` has to be called within the `it` block to avoid this caching.