Every JavaScript developer has written jest.mock() at least once, thinking they were creating a mock. They weren't. Maybe that's the real jest in Jest: the function name that turned the testing world into a linguistic punchline. We thought we were mocking our code. Turns out, it was mocking us.

In...