Unhandled promise rejection: Error: Injector has already been destroyed

Viewed 947

In this issue that was recently closed: https://github.com/angular/angular/issues/44186

A contributer (@jessicajaniuk) says

We believe this is resolved by destroyAfterEach: true. If you're seeing failures that require destroyAfterEach: false, it's likely you have scope leakage in your tests. If you continue to see the original issue, please open a new issue for it.

I was wondering if anyone can elaborate on or suggest strategies on how to identify "scope creep"

I'm also running into this after upgrading to Angular 13 with destroyAfterEach: true

0 Answers
Related