@marimo-team/frontend 0.25.2-dev47 → 0.25.2-dev48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/frontend",
3
- "version": "0.25.2-dev47",
3
+ "version": "0.25.2-dev48",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -0,0 +1,30 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+ import { fireEvent, render } from "@testing-library/react";
3
+ import { describe, expect, it, vi } from "vitest";
4
+ import { SetupMocks } from "@/__mocks__/common";
5
+ import { Slider } from "../slider";
6
+
7
+ SetupMocks.resizeObserver();
8
+
9
+ describe("Slider", () => {
10
+ // Regression for #2593: steps below 1e-6 stringify in exponent notation
11
+ // ("1e-7"), which older radix versions counted as 0 decimal places, so
12
+ // every value was rounded to an integer and the slider never moved.
13
+ it.each([1e-6, 1e-7, 1e-9])("moves by a tiny step of %s", (step) => {
14
+ const onValueChange = vi.fn();
15
+ const { getByRole } = render(
16
+ <Slider
17
+ value={[step]}
18
+ min={step}
19
+ max={100 * step}
20
+ step={step}
21
+ onValueChange={onValueChange}
22
+ valueMap={(v) => v}
23
+ />,
24
+ );
25
+
26
+ fireEvent.keyDown(getByRole("slider"), { key: "ArrowRight" });
27
+
28
+ expect(onValueChange).toHaveBeenCalledWith([2 * step]);
29
+ });
30
+ });