Writing Unit Tests with Jest
What test setup pattern is being used?
describe('API client', () => {
let client;
beforeEach(() => {
client = new ApiClient();
jest.spyOn(client, 'request');
});
afterEach(() => {
jest.restoreAllMocks();
});