Expected a spy, but got Function
问题 I am trying to implement a test (1) for this module (2). My purpose is to check if the collection is fetched when a particular event is triggered. As you can see from my comment in (2) I get the message Error: Expected a spy, but got Function. The module works but the test fails. any ideas? (1) // jasmine test module describe('When onGivePoints is fired', function () { beforeEach(function () { spyOn(this.view.collection, 'restartPolling').andCallThrough(); app.vent.trigger('onGivePoints'); })