This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Better use this matcher than using toBeNull or toBeUndefined to test a DebugElement so as to avoid freezing the test. | |
// When expecting a DebugElement to be null but is not, jasmine will create a gigantic string describing the DebugElement. | |
// More on https://medium.com/@martatatiana/poor-detective-angular2-browser-crash-and-debugelement-f0a651dbf33 | |
// e.g. expect(fixture.debugElement.query(By.css("img:first-of-type"))).toDebugElemExists(); | |
// you can also use .not to negate the matcher. | |
beforeEach(() => { | |
jasmine.addMatchers({ | |
toDebugElemExists: function (utils, customEqualityTesters) { | |
return { |