Karma-Jasmine: How to properly spy on a Modal?
问题 THE SITUATION: I am unit testing my Angular / Ionic app. I am having troubles with the modal. At the moment i can test that the modal has been called. That's all so far. I cannot test the proper show() and hide() method of the modal. I am getting the following errors: TypeError: $scope.modal_login.show is not a function Error: show() method does not exist TypeError: $scope.modal_login.hide is not a function Error: hide() method does not exist I think it depends entirely on the spy. I don't