import { expect, test } from "vitest" import { createXyzColorValue } from "#Source/color/index.ts" test("createXyzColorValue validates non-negative channels", () => { expect(createXyzColorValue({ x: 0.25, y: 0.3, z: 0.4, alpha: 1 })).toEqual({ x: 0.25, y: 0.3, z: 0.4, alpha: 1, }) expect(() => createXyzColorValue({ x: -0.1, y: 0.3, z: 0.4, alpha: 1 })).toThrow(RangeError) })