monday-ui-react-core
Version:
Official monday.com UI resources for application development in React.js
26 lines (24 loc) • 759 B
JavaScript
import { calculatePageStep } from "../SliderHelpers";
describe("Check calculatePageStep helper", () => {
// table: expected, min, max, step
test.each([
// calculated pageStep less than step - slider step big enough
[],
[],
[],
[],
[],
// many steps with fixedPageStep - multiply it
[],
[],
[],
[],
// common/default use-case simple calculated pageStep
[],
[],
[],
[]
])("pageStep should be (%i) for: min=%i, max=%i, step=%i", (expected, min, max, step) => {
expect(calculatePageStep(max, min, step)).toBe(expected);
});
});