import { expect, test } from "vitest" import { NUMBER_INPUTOR_TYPE_NAME, NumberInputorController } from "#Source/form/index.ts" test("NumberInputorController.getSchema exposes constraints and updateValue clamps with step rounding", async () => { const controller = new NumberInputorController({ id: "number-id", value: 2, min: 0, max: 10, step: 3, }) await controller.waitForReady() await controller.updateValue(11) expect(await controller.getSchema()).toEqual({ inputorTypeName: NUMBER_INPUTOR_TYPE_NAME, id: "number-id", name: `number-number-id`, placeholder: "", value: 9, isVoid: false, isFocused: false, isTouched: false, isDirty: true, isDisabled: false, isDebugMode: false, min: 0, max: 10, step: 3, }) })