Skip to content

Commit

Permalink
feat: destroy fixture in cleanup (#240) (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas-Kullmann authored Jul 30, 2021
1 parent 2cd25b8 commit dca7edd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects/testing-library/src/lib/testing-library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ function cleanup() {
}

function cleanupAtFixture(fixture) {
fixture.destroy();

if (!fixture.nativeElement.getAttribute('ng-version') && fixture.nativeElement.parentNode === document.body) {
document.body.removeChild(fixture.nativeElement);
}
Expand Down

0 comments on commit dca7edd

Please sign in to comment.