Writing Unit Tests with Jest
What testing best practice is demonstrated here?
describe('User service', () => {
const mockDb = {
query: jest.fn()
};
const userService = new UserService(mockDb);
beforeEach(() => {
mockDb.query.mockClear();
});
});