Skip to content

Commit

Permalink
test(core): fix failing unit test (#43714)
Browse files Browse the repository at this point in the history
Fixes a unit test that now fails, because rethrowing errors is enabled by default. The problem is that we're checking the behavior of a component that throws during `ngOnDestroy`, but since the `resetTestingModule` call itself throws, the test is considered as failing.

PR Close #43714
  • Loading branch information
crisbeto authored and dylhunn committed Oct 5, 2021
1 parent 263feba commit 318cf91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/test/linker/jit_summaries_integration_spec.ts
Expand Up @@ -242,8 +242,8 @@ import {obsoleteInIvy} from '@angular/private/testing';
component,
};

TestBed.resetTestingModule();

expect(() => TestBed.resetTestingModule())
.toThrowError('1 component threw errors during cleanup');
expect(console.error)
.toHaveBeenCalledWith('Error during cleanup of component', expectedObject);
});
Expand Down

0 comments on commit 318cf91

Please sign in to comment.