使用jasmine对angularJs中的回调函数进行单元测试

时间:2017-01-25 09:30:26

标签: angularjs unit-testing jasmine karma-jasmine

如何使用jasmine对回调函数进行单元测试。

let somefunctionCallback = function (error, response) {
  if (!error) {
    $('.loading').hide();
    $scope.infomsg = response.data.message;
    $scope.showInfoMsg();
    $timeout(vm.hideInfoMsg, 3000);

    someFactory.getTestList('avList', $scope.tokenId, vm.someotherCallback);
  }
};

0 个答案:

没有答案
相关问题