Skip to content

Commit 318cf91

Browse files
crisbetodylhunn
authored andcommitted
test(core): fix failing unit test (#43714)
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
1 parent 263feba commit 318cf91

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/core/test/linker/jit_summaries_integration_spec.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ import {obsoleteInIvy} from '@angular/private/testing';
242242
component,
243243
};
244244

245-
TestBed.resetTestingModule();
246-
245+
expect(() => TestBed.resetTestingModule())
246+
.toThrowError('1 component threw errors during cleanup');
247247
expect(console.error)
248248
.toHaveBeenCalledWith('Error during cleanup of component', expectedObject);
249249
});

0 commit comments

Comments
 (0)