Skip to content

Commit b57b686

Browse files
authored
test(material/bottom-sheet): refactor variable type to const in bottom-sheet component unit tests (#22895)
style(material/bottom-sheet): fix tslint max-line-length exceeds issue in ci build
1 parent 766b07e commit b57b686

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/material/bottom-sheet/bottom-sheet.spec.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ describe('MatBottomSheet', () => {
189189

190190
viewContainerFixture.detectChanges();
191191

192-
let backdrop = overlayContainerElement.querySelector('.cdk-overlay-backdrop') as HTMLElement;
192+
const backdrop = overlayContainerElement.querySelector('.cdk-overlay-backdrop') as HTMLElement;
193193

194194
backdrop.click();
195195
viewContainerFixture.detectChanges();
@@ -252,7 +252,7 @@ describe('MatBottomSheet', () => {
252252

253253
viewContainerFixture.detectChanges();
254254

255-
let overlayPane = overlayContainerElement.querySelector('.cdk-global-overlay-wrapper')!;
255+
const overlayPane = overlayContainerElement.querySelector('.cdk-global-overlay-wrapper')!;
256256

257257
expect(overlayPane.getAttribute('dir')).toBe('rtl');
258258
});
@@ -320,7 +320,7 @@ describe('MatBottomSheet', () => {
320320
}));
321321

322322
it('should open a new bottom sheet after dismissing a previous sheet', fakeAsync(() => {
323-
let config: MatBottomSheetConfig = {viewContainerRef: testViewContainerRef};
323+
const config: MatBottomSheetConfig = {viewContainerRef: testViewContainerRef};
324324
let bottomSheetRef: MatBottomSheetRef<any> = bottomSheet.open(PizzaMsg, config);
325325

326326
viewContainerFixture.detectChanges();
@@ -495,7 +495,8 @@ describe('MatBottomSheet', () => {
495495

496496
viewContainerFixture.detectChanges();
497497

498-
let backdrop = overlayContainerElement.querySelector('.cdk-overlay-backdrop') as HTMLElement;
498+
const backdrop =
499+
overlayContainerElement.querySelector('.cdk-overlay-backdrop') as HTMLElement;
499500
backdrop.click();
500501
viewContainerFixture.detectChanges();
501502
flush();
@@ -518,14 +519,15 @@ describe('MatBottomSheet', () => {
518519
}));
519520

520521
it('should allow for the disableClose option to be updated while open', fakeAsync(() => {
521-
let bottomSheetRef = bottomSheet.open(PizzaMsg, {
522+
const bottomSheetRef = bottomSheet.open(PizzaMsg, {
522523
disableClose: true,
523524
viewContainerRef: testViewContainerRef
524525
});
525526

526527
viewContainerFixture.detectChanges();
527528

528-
let backdrop = overlayContainerElement.querySelector('.cdk-overlay-backdrop') as HTMLElement;
529+
const backdrop =
530+
overlayContainerElement.querySelector('.cdk-overlay-backdrop') as HTMLElement;
529531
backdrop.click();
530532

531533
expect(overlayContainerElement.querySelector('mat-bottom-sheet-container')).toBeTruthy();

0 commit comments

Comments
 (0)