Testing angular service with $httpBackend with async/await using jasmin
问题 I have previously successfully tested an angular controller that uses ES7 async/await syntax with jasmine - async updateGridAsync() { const paging = angular.copy(this.gridData.getServerCallObj()); } try { const model = await this.service.getAsync(paging); this._$rootScope.$apply(); } catch (e){this._notification.error(this._$rootScope.lang.notifications.unexpectedError); } } it('updateGridAsync() should update the gridData when succeed', async (done) => { expect(ctrl.gridData.totalItems)