(type: HarmonyType | undefined, input: string, expected: string[])
| 97 | extend([harmoniesPlugin]); |
| 98 | |
| 99 | const check = (type: HarmonyType | undefined, input: string, expected: string[]) => { |
| 100 | const harmonies = colord(input).harmonies(type); |
| 101 | const hexes = harmonies.map((value) => value.toHex()); |
| 102 | return expect(hexes).toEqual(expected); |
| 103 | }; |
| 104 | |
| 105 | it("Generates harmony colors", () => { |
| 106 | check(undefined, "#ff0000", ["#ff0000", "#00ffff"]); // "complementary" |
no test coverage detected
searching dependent graphs…