fix(ngMock): prevent memory leak due to data attached to `$rootElement`
Starting with 88bb551, `ngMock` will attach the `$injector` to the `$rootElement`, but will never clean it up, resulting in a memory leak. Since a new `$rootElement` is created for every test, this leak causes Karma to crash on large test-suites. The problem was not detected by our internal tests, because we do our own clean-up in `testabilityPatch.js`. 88bb551 was revert with 1b8590a. This commit incorporates the changes from 88bb551 and prevents the memory leak, by cleaning up all data attached to `$rootElement` after each test. Fixes #14094 Closes #14098
G
Georgios Kalpakas committed
571e323f7d1f720e7612def7a1b29f4fc48c4f5b
Parent: bf11cf3