diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/directivesSpec.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/directivesSpec.js b/test/directivesSpec.js index 447698a3..7e0446ef 100644 --- a/test/directivesSpec.js +++ b/test/directivesSpec.js @@ -12,6 +12,11 @@ describe("directives", function(){ }; }); + afterEach(function(){ + element.remove(); + expect(_(jqCache).size()).toEqual(0); + }); + it("should ng-init", function() { var scope = compile('<div ng-init="a=123"></div>'); expect(scope.get('a')).toEqual(123); @@ -100,7 +105,7 @@ describe("directives", function(){ scope.updateView(); expect(scope.get('clicked')).toBeFalsy(); - jQuery(element.element).click(); + element.click(); expect(scope.get('clicked')).toEqual(true); }); }); |
