How can I test that a function has not been called? December 16, 2022 by Tarik Use the not operator: expect(controller.bar).not.toHaveBeenCalled();