Skip to content

Commit 3c5febc

Browse files
committed
test: spec compliant step rounding
Ensure using the min attribute as step base. Related: #210
1 parent 98f01b5 commit 3c5febc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/range-slider.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,11 @@ test('track click updates the value and sends events', async () => {
168168
// Should dispatch "change" event
169169
expect(handleChangeEvent).toHaveBeenCalled();
170170
});
171+
172+
test('Spec compliant step rounding using the min attribute as step base', async () => {
173+
render('<range-slider min="5" step="2" value="5"></range-slider>');
174+
175+
const element = document.querySelector('range-slider');
176+
element.stepUp();
177+
expect(element).toHaveValue('7');
178+
});

0 commit comments

Comments
 (0)