fix(core): add stacktrace in log when error during cleanup component in TestBed (#22162)

PR Close #22162
This commit is contained in:
guillaumebarranco
2018-02-12 14:09:51 +01:00
committed by Miško Hevery
parent b75cf3f70b
commit 16d1700a8e
2 changed files with 34 additions and 2 deletions

View File

@ -287,7 +287,10 @@ export class TestBed implements Injector {
try {
fixture.destroy();
} catch (e) {
console.error('Error during cleanup of component', fixture.componentInstance);
console.error('Error during cleanup of component', {
component: fixture.componentInstance,
stacktrace: e,
});
}
});
this._activeFixtures = [];