当我调用postMessage方法时,我想检查是否触发了navigateTo事件it('should post message on click', async () => { let postMessageSpy = spyOn(window.parent, 'postMessage');
component.navigateTo
setTimeout可以很好地处理jasmine.clock().tick()方法,但是$timeout和debounce不能 $scope.delayed1(); expect($scope.name).toEqual('Hello world by setTimeout'); it('should