test(grid-list): make error expectation less brittle (#15303)

This makes the test pass in ivy (as well as ViewEngine) since attribute
bindings are set during creating mode in ivy.
This commit is contained in:
Jeremy Elbourn
2019-02-25 13:55:55 -08:00
committed by GitHub
parent 6f3c2de801
commit 53b01bcab2
+4 -3
View File
@@ -23,9 +23,10 @@ describe('MatGridList', () => {
});
it('should throw error if rowHeight ratio is invalid', () => {
const fixture = createComponent(GridListWithInvalidRowHeightRatio);
expect(() => fixture.detectChanges()).toThrowError(/invalid ratio given for row-height/);
expect(() => {
const fixture = createComponent(GridListWithInvalidRowHeightRatio);
fixture.detectChanges();
}).toThrowError(/invalid ratio given for row-height/);
});
it('should throw error if tile colspan is wider than total cols', () => {