Jest how to assert that function is not called December 22, 2022 by Tarik Just use not. expect(mockFn).not.toHaveBeenCalled() See the jest documentation