import type { ColorToken } from "@vitality-ds/tokens/src/Color/types"; import createScaleInStitchesFormat from "./createScaleInStitchesFormat"; const mockTheme: { cyan8: ColorToken<"cyan">; cyan9: ColorToken<"cyan">; } = { cyan8: { name: "cyan8", data: { hsla: { h: 1, s: 1, l: 1, a: 1 }, rgbaString: "123", hslaString: "hsl(49, 92%, 50%)", hwbString: "123", codeName: "cyan8", hexString: "123", }, }, cyan9: { name: "cyan9", data: { hsla: { h: 1, s: 1, l: 1, a: 1 }, rgbaString: "123", hslaString: "hsl(49, 92%, 20%)", hwbString: "123", codeName: "cyan9", hexString: "123", }, }, }; describe("createScaleInStitchesFormat", () => { it("Returns all the colors in a scale as an object with its hslaString as the value", () => { const output = createScaleInStitchesFormat(mockTheme); expect(output).toEqual({ cyan8: "hsl(49, 92%, 50%)", cyan9: "hsl(49, 92%, 20%)", }); }); });