Skip to content

Commit 6827d3a

Browse files
committed
angular-material: Fix @typescript-eslint/no-non-null-assertion violations
1 parent eaa4d5a commit 6827d3a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/angular-material/test/array-layout.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ describe('Array layout', () => {
125125

126126
const arrayLayoutElement: HTMLElement = fixture.nativeElement;
127127
const matBadgeElement =
128-
arrayLayoutElement.querySelector('.mat-badge-content')!;
128+
arrayLayoutElement.querySelector('.mat-badge-content');
129129

130130
const noDataElement = arrayLayoutElement.children[0].children[1];
131131

132-
expect(matBadgeElement.textContent).toBe('1');
132+
expect(matBadgeElement?.textContent).toBe('1');
133133
expect(noDataElement.textContent).toBe('No data');
134134
});
135135
});
@@ -149,9 +149,9 @@ describe('Array layout', () => {
149149

150150
const arrayLayoutElement: HTMLElement = fixture.nativeElement;
151151
const matBadgeElement =
152-
arrayLayoutElement.querySelector('.mat-badge-content')!;
152+
arrayLayoutElement.querySelector('.mat-badge-content');
153153

154-
expect(matBadgeElement.textContent).toBe('2');
154+
expect(matBadgeElement?.textContent).toBe('2');
155155
});
156156
});
157157

@@ -170,9 +170,9 @@ describe('Array layout', () => {
170170

171171
const arrayLayoutElement: HTMLElement = fixture.nativeElement;
172172
const matBadgeElement =
173-
arrayLayoutElement.querySelector('.mat-badge-content')!;
173+
arrayLayoutElement.querySelector('.mat-badge-content');
174174

175-
expect(matBadgeElement.textContent).toBe('4');
175+
expect(matBadgeElement?.textContent).toBe('4');
176176
});
177177
});
178178
});

0 commit comments

Comments
 (0)