fix(ngMock): don't break if `$rootScope.$destroy()` is not a function
Previously, `angular-mocks` was calling `$rootScope.$destroy()` after each test as part of it's cleaning up, assuming that it was always available. This could break if `$rootScope` was mocked and the mocked version didn't provide the `$destroy()` method. This commit prevents the error by first checking that `$rootScope.$destroy` is present. Fixes #14106 Closes #14107
G
Georgios Kalpakas committed
871bebf7dcf4d3109ce37501fffe666a03010b27
Parent: 7e112c1