From abac7dc11abfc03b12c69e81f34da6e13612576e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?= Date: Wed, 28 Mar 2018 12:36:19 +0200 Subject: [PATCH] test(ngMock): remove a broken jqLite cache clearing This commit removes the resetting of `angular.element.cache` in some tests; this was desynchronizing jqLite.cache & the local jqCache variable and since some parts of the code use one of them and some the other one, it was breaking JQLite._data. `angular.element.cache` doesn't even exist when jQuery 2+ is used. --- test/ngMock/angular-mocksSpec.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/ngMock/angular-mocksSpec.js b/test/ngMock/angular-mocksSpec.js index 43c39772a9ea..9bfbcfc741a4 100644 --- a/test/ngMock/angular-mocksSpec.js +++ b/test/ngMock/angular-mocksSpec.js @@ -3123,10 +3123,6 @@ describe('sharedInjector', function() { define(); sdescribe.root.run(); } finally { - // avoid failing testability for the additional - // injectors etc created - angular.element.cache = {}; - // clear up module.$$beforeAllHook = null; module.$$afterAllHook = null;