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);
});
,但我不能完全轉移邏輯/知識測試原始查詢。任何人有任何想法?我需要嘲笑一些東西嗎?