build: report ngOnDestroy exceptions in unti tests (#5036)
build: report ngOnDestroy exceptions in unti tests (#5036)

Monkey-patches TestBed.resetTestingModule such that any errors that occur during component destruction are thrown instead of silently logged. Also runs TestBed.resetTestingModule after each unit test.

 Without this patch, the combination of two behaviors is problematic for Angular Material:
 - TestBed.resetTestingModule catches errors thrown on fixture destruction and logs them without the errors ever being thrown. This means that any component errors that occur in ngOnDestroy can encounter errors silently and still pass unit tests.
 - TestBed.resetTestingModule is only called *before* a test is run, meaning that even *if* the aforementioned errors were thrown, they would be reported for the wrong test (the test that's about to start, not the test that just finished).
kara/material2,tinayuangao/material2,fairfaxmedia/material2,amcdnl/material2,andrewseguin/material2,jelbourn/material2,ChronosWS/material2,Eddman/material2,emoralesb05/material2,angular/components,Eddman/material2,mmalerba/material2,angular/components,tinayuangao/material2,kara/material2,crisbeto/material2,RobJacobs/material2,tomlandau/material2-new,mmalerba/material2,RobJacobs/material2,jelbourn/material2,amcdnl/material2,amcdnl/material2,joejordanbrown/material2,mcl-de/material2,Jefiozie/material2,emoralesb05/material2,Jefiozie/material2,DevVersion/material2,Jefiozie/material2,mmalerba/material2,fairfaxmedia/material2,amcdnl/material2,mmalerba/material2,willshowell/material2,nkwood/material2,nkwood/material2,willshowell/material2,andrewseguin/material2,Jefiozie/material2,crisbeto/material2,attilacsanyi/material2,shaunak1111/material2,DevVersion/material2,ChronosWS/material2,kara/material2,Eddman/material2,jasnoponjatno/material2,RobJacobs/material2,joejordanbrown/material2,fairfaxmedia/material2,jasnoponjatno/material2,emoralesb05/material2,angular/components,jasnoponjatno/material2,tinayuangao/material2,josephperrott/material2,mmalerba/material2,sllethe/material2,attilacsanyi/material2,sllethe/material2,josephperrott/material2,willshowell/material2,emoralesb05/material2,andrewseguin/material2,jelbourn/material2,willshowell/material2,tomlandau/material2-new,ChronosWS/material2,tomlandau/material2-new,Jefiozie/material2,ppham27/material2,crisbeto/material2,tomlandau/material2-new,nkwood/material2,ppham27/material2,joejordanbrown/material2,RobJacobs/material2,DevVersion/material2,DevVersion/material2,jasnoponjatno/material2,ppham27/material2,mcl-de/material2,fairfaxmedia/material2,jelbourn/material2,willshowell/material2,angular/components,ppham27/material2,crisbeto/material2,ChronosWS/material2,attilacsanyi/material2,josephperrott/material2,Eddman/material2,sllethe/material2,fairfaxmedia/material2,ppham27/material2,mcl-de/material2,shaunak1111/material2,emoralesb05/material2,joejordanbrown/material2,josephperrott/material2,josephperrott/material2,andrewseguin/material2,jelbourn/material2,sllethe/material2,amcdnl/material2,attilacsanyi/material2,Eddman/material2,mcl-de/material2,shaunak1111/material2,andrewseguin/material2,DevVersion/material2,kara/material2,tinayuangao/material2,shaunak1111/material2,nkwood/material2,tinayuangao/material2