0
ajamil posted
use of expect function in the Angular js
working with cordova App, and i jst started learning Angular js and checking some PasswordController . i found some code
it('sets the strength to "strong" if the password length is >8 chars', function() {
var $scope = {};
var controller = $controller('PasswordController', { $scope: $scope });
$scope.password = 'longerthaneightchars';
$scope.grade();
expect($scope.strength).toEqual('strong');
});
want to know what is use of expect in this scenario ?