Skip to content

Commit 53b01bc

Browse files
authored
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.
1 parent 6f3c2de commit 53b01bc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lib/grid-list/grid-list.spec.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ describe('MatGridList', () => {
2323
});
2424

2525
it('should throw error if rowHeight ratio is invalid', () => {
26-
const fixture = createComponent(GridListWithInvalidRowHeightRatio);
27-
28-
expect(() => fixture.detectChanges()).toThrowError(/invalid ratio given for row-height/);
26+
expect(() => {
27+
const fixture = createComponent(GridListWithInvalidRowHeightRatio);
28+
fixture.detectChanges();
29+
}).toThrowError(/invalid ratio given for row-height/);
2930
});
3031

3132
it('should throw error if tile colspan is wider than total cols', () => {

0 commit comments

Comments
 (0)