Skip to content

Instantly share code, notes, and snippets.

@matsko
Created August 27, 2014 23:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matsko/46534a40cadb1d8466b5 to your computer and use it in GitHub Desktop.
Save matsko/46534a40cadb1d8466b5 to your computer and use it in GitHub Desktop.
iit('should continue the phase', inject(function($rootScope) {
$rootScope.$watch('a', function(a) {
if (a === 1) throw new minErr('$compile')('fail', '...');
});
$rootScope.a = 0;
$rootScope.$digest();
expect(function() {
$rootScope.a = 1;
$rootScope.$digest();
}).toThrow();
$rootScope.$digest();
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment