Skip to content

Commit f0d144c

Browse files
committed
fix test for max pips
1 parent 2ecf0b4 commit f0d144c

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

dist/range-slider-pips.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Multi-Thumb, Accessible, Beautiful Range Slider with Pips
44
* Project home: https://simeydotme.github.io/svelte-range-slider-pips/
55
* © 2025 Simon Goellner <[email protected]> ~ MPL-2.0 License
6-
* Published: 6/6/2025
6+
* Published: 7/6/2025
77
*/
88
(function (global, factory) {
99
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :

dist/range-slider-pips.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Multi-Thumb, Accessible, Beautiful Range Slider with Pips
44
* Project home: https://simeydotme.github.io/svelte-range-slider-pips/
55
* © 2025 Simon Goellner <[email protected]> ~ MPL-2.0 License
6-
* Published: 6/6/2025
6+
* Published: 7/6/2025
77
*/
88
/** @returns {void} */
99
function noop() {}

tests/playwright/RangePips.steps.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -858,10 +858,10 @@ test.describe('Step Property Tests', () => {
858858

859859
// normally we would expect 10,001 pips (100/0.01 + 1)
860860
// but because of the stepMax limit, the step is divided by 5 (2000),
861-
// however, there's a check to make sure we don't show more than 1000 pips (pipCount > 1000),
862-
// which will recursively divide the pipstep by 2 until it gets below 1000.
863-
// so we end up with 501 pips.
864-
await expect(pips).toHaveCount(501);
861+
// however, there's a check to make sure we don't show more than 500 pips (pipCount > 500),
862+
// which will recursively divide the pipstep by 2 until it gets below 500.
863+
// so we end up with 251 pips.
864+
await expect(pips).toHaveCount(251);
865865
await expect(pipValues).toContainText(['0', '100']);
866866
});
867867

@@ -882,10 +882,10 @@ test.describe('Step Property Tests', () => {
882882

883883
// Normally we would expect 1,000,001 pips (100/0.0001 + 1)
884884
// but because of the stepMax limit, the step is divided by 5 (200000),
885-
// however, there's a check to make sure we don't show more than 1000 pips (pipCount > 1000),
886-
// which will recursively divide the pipstep by 2 until it gets below 1000.
887-
// so we end up with 783 pips. ( 200000 -> 100000 -> 50000 -> 25000 -> 12500 -> 6250 -> 3125 -> 1563 -> 782 ) + 1
888-
await expect(pips).toHaveCount(783);
885+
// however, there's a check to make sure we don't show more than 500 pips (pipCount > 500),
886+
// which will recursively divide the pipstep by 2 until it gets below 500.
887+
// so we end up with 392 pips. ( 200000 -> 100000 -> 50000 -> 25000 -> 12500 -> 6250 -> 3125 -> 1563 -> 782 -> 391 ) + 1
888+
await expect(pips).toHaveCount(392);
889889
await expect(pipValues).toContainText(['0', '100']);
890890
});
891891

0 commit comments

Comments
 (0)