test("mockName", () => { const mockFn = jest.fn().mockName("mockedFunction"); mockFn(); // comment me expect(mockFn).toHaveBeenCalled(); });