Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ichik committed Dec 14, 2023
1 parent c825bbf commit 6378ab8
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe("bg color", () => {

it("should return correct color when lightness < 0.93", () => {
const { bg } = new LightModeTheme("oklch(0.92 0.09 231)").getColors();
expect(bg).toBe("rgb(95.828% 98.573% 100%)");
expect(bg).toBe("rgb(92.567% 95.296% 96.777%)");
});

it("should return correct color when hue > 120 && hue < 300", () => {
Expand All @@ -18,12 +18,12 @@ describe("bg color", () => {

it("should return correct color when hue < 120 or hue > 300", () => {
const { bg } = new LightModeTheme("oklch(0.92 0.07 110)").getColors();
expect(bg).toBe("rgb(98.101% 98.258% 96.176%)");
expect(bg).toBe("rgb(94.827% 94.982% 92.913%)");
});

it("should return correct color when chroma < 0.04", () => {
const { bg } = new LightModeTheme("oklch(0.92 0.02 110)").getColors();
expect(bg).toBe("rgb(98.026% 98.026% 98.026%)");
expect(bg).toBe("rgb(94.752% 94.752% 94.752%)");
});
});

Expand Down Expand Up @@ -794,12 +794,12 @@ describe("bdFocus color", () => {

it("should return correct color when hue is between 0 and 55", () => {
const { bdFocus } = new LightModeTheme("oklch(0.85 0.1 30)").getColors();
expect(bdFocus).toEqual("rgb(100% 70.125% 64.059%)");
expect(bdFocus).toEqual("rgb(72.468% 27.962% 22.197%)");
});

it("should return correct color when hue > 340", () => {
const { bdFocus } = new LightModeTheme("oklch(0.85 0.1 350)").getColors();
expect(bdFocus).toEqual("rgb(100% 67.07% 84.709%)");
expect(bdFocus).toEqual("rgb(68.494% 27.322% 49.304%)");
});
});

Expand Down

0 comments on commit 6378ab8

Please sign in to comment.