Skip to content

Commit c36f10d

Browse files
authored
refactor(material/slider): refactor variable type to const in slider component unit tests (#22840)
1 parent 21b81d6 commit c36f10d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/material/slider/slider.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ describe('MatSlider', () => {
331331

332332
// Computed by multiplying the difference between the min and the max by the percentage from
333333
// the mousedown and adding that to the minimum.
334-
let value = Math.round(4 + (0.09 * (6 - 4)));
334+
const value = Math.round(4 + (0.09 * (6 - 4)));
335335
expect(sliderInstance.value).toBe(value);
336336
});
337337

@@ -341,7 +341,7 @@ describe('MatSlider', () => {
341341

342342
// Computed by multiplying the difference between the min and the max by the percentage from
343343
// the mousedown and adding that to the minimum.
344-
let value = Math.round(4 + (0.62 * (6 - 4)));
344+
const value = Math.round(4 + (0.62 * (6 - 4)));
345345
expect(sliderInstance.value).toBe(value);
346346
});
347347

@@ -1136,10 +1136,10 @@ describe('MatSlider', () => {
11361136
testComponent.dir = 'rtl';
11371137
fixture.detectChanges();
11381138

1139-
let initialTrackFillStyles = sliderInstance._getTrackFillStyles();
1140-
let initialTicksContainerStyles = sliderInstance._getTicksContainerStyles();
1141-
let initialTicksStyles = sliderInstance._getTicksStyles();
1142-
let initialThumbContainerStyles = sliderInstance._getThumbContainerStyles();
1139+
const initialTrackFillStyles = sliderInstance._getTrackFillStyles();
1140+
const initialTicksContainerStyles = sliderInstance._getTicksContainerStyles();
1141+
const initialTicksStyles = sliderInstance._getTicksStyles();
1142+
const initialThumbContainerStyles = sliderInstance._getThumbContainerStyles();
11431143

11441144
testComponent.dir = 'ltr';
11451145
fixture.detectChanges();
@@ -1449,7 +1449,7 @@ describe('MatSlider', () => {
14491449
});
14501450

14511451
it('should have the correct control state initially and after interaction', () => {
1452-
let sliderControl = testComponent.control;
1452+
const sliderControl = testComponent.control;
14531453

14541454
// The control should start off valid, pristine, and untouched.
14551455
expect(sliderControl.valid).toBe(true);

0 commit comments

Comments
 (0)