Skip to content

Commit 46568bd

Browse files
committed
Remove math.rounds
1 parent f29b017 commit 46568bd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/slider/slider.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ describe('MdSlider', () => {
119119
// offset relative to the track, subtract the offset on the track fill.
120120
let thumbPosition = thumbDimensions.left - trackFillDimensions.left;
121121
// The track fill width should be equal to the thumb's position.
122-
expect(Math.round(trackFillDimensions.width)).toBe(Math.round(thumbPosition));
122+
expect(trackFillDimensions.width).toBe(thumbPosition);
123123
});
124124

125125
it('should update the thumb position on click', () => {
@@ -145,7 +145,7 @@ describe('MdSlider', () => {
145145
// offset relative to the track, subtract the offset on the track fill.
146146
let thumbPosition = thumbDimensions.left - trackFillDimensions.left;
147147
// The track fill width should be equal to the thumb's position.
148-
expect(Math.round(trackFillDimensions.width)).toBe(Math.round(thumbPosition));
148+
expect(trackFillDimensions.width).toBe(thumbPosition);
149149
});
150150

151151
it('should update the thumb position on slide', () => {
@@ -310,7 +310,7 @@ describe('MdSlider', () => {
310310

311311
// The closest snap is halfway on the slider.
312312
expect(thumbDimensions.left).toBe(sliderDimensions.width * 0.5 + sliderDimensions.left);
313-
expect(Math.round(trackFillDimensions.width)).toBe(Math.round(thumbPosition));
313+
expect(trackFillDimensions.width).toBe(thumbPosition);
314314
});
315315

316316
it('should snap the thumb and fill to the nearest value on slide', () => {
@@ -326,7 +326,7 @@ describe('MdSlider', () => {
326326

327327
// The closest snap is at the halfway point on the slider.
328328
expect(thumbDimensions.left).toBe(sliderDimensions.left + sliderDimensions.width * 0.5);
329-
expect(Math.round(trackFillDimensions.width)).toBe(Math.round(thumbPosition));
329+
expect(trackFillDimensions.width).toBe(thumbPosition);
330330

331331
});
332332
});
@@ -411,7 +411,7 @@ describe('MdSlider', () => {
411411

412412
// The closest step is at 75% of the slider.
413413
expect(thumbDimensions.left).toBe(sliderDimensions.width * 0.75 + sliderDimensions.left);
414-
expect(Math.round(trackFillDimensions.width)).toBe(Math.round(thumbPosition));
414+
expect(trackFillDimensions.width).toBe(thumbPosition);
415415
});
416416

417417
it('should set the correct step value on slide', () => {
@@ -434,7 +434,7 @@ describe('MdSlider', () => {
434434

435435
// The closest snap is at the end of the slider.
436436
expect(thumbDimensions.left).toBe(sliderDimensions.width + sliderDimensions.left);
437-
expect(Math.round(trackFillDimensions.width)).toBe(Math.round(thumbPosition));
437+
expect(trackFillDimensions.width).toBe(thumbPosition);
438438
});
439439
});
440440

0 commit comments

Comments
 (0)