0
你会如何测试这个角度测试指令?测试一个角度js指令?
$scope.cancel = function() {
$('#pp_bsktexit').modal('show');
};
这样的事情,我可以测试,它似乎并没有太:
VAR nextScreenPath = 'C_HIST';
$scope.goBack = function() {
//sessionService.save($scope.sessionData);
$location.path(nextScreenPath);
}
和测试:
it('should return location path as nextScreenPath', function(){
var nextScreenPath = 'C_HIST';
expect($location.path()).toEqual('');
scope.goBack();
expect($location.path()).toEqual('/' + nextScreenPath);
});
,但我不能完全转移逻辑/知识测试原始查询。任何人有任何想法?我需要嘲笑一些东西吗?