Whoo got unit tests that are failing...

This commit is contained in:
Lani Aung
2025-06-07 15:26:51 -07:00
parent 5e9039efad
commit 44053555ec
15 changed files with 2472 additions and 114 deletions
+21
View File
@@ -0,0 +1,21 @@
import HSL from "../src/hsl"
import RGB from "../src/rgb"
describe("HSL", () => {
it("should match provided base RBG values", () => {
const red = HSL.fromRgb(new RGB(255, 0, 0))
expect(red.hue).toEqual(0)
expect(red.lightness).toEqual(.5)
expect(red.saturation).toEqual(1)
const green = HSL.fromRgb(new RGB(0, 255, 0))
expect(green.hue).toEqual(120)
expect(green.lightness).toEqual(.5)
expect(green.saturation).toEqual(1)
const blue = HSL.fromRgb(new RGB(0, 0, 255))
expect(blue.hue).toEqual(240)
expect(blue.lightness).toEqual(.5)
expect(blue.saturation).toEqual(1)
})
})