In your unit tests you need to manually call $scope.$digest() or $scope.$apply() to trigger $scope.$watch().
Normally in your code you wouldn’t have to do this, since directives like ng-click do $rootScope.$apply for you behind the scenes.
In your unit tests you need to manually call $scope.$digest() or $scope.$apply() to trigger $scope.$watch().
Normally in your code you wouldn’t have to do this, since directives like ng-click do $rootScope.$apply for you behind the scenes.