Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnuttandrew committed Feb 6, 2024
1 parent 91f8482 commit 60bd1e7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 0 additions & 12 deletions src/lib/ColorLint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Color } from "./Color";
import type { Palette } from "../stores/color-store";

import ColorNameDiscriminability, { getName } from "./lints/name-discrim";
import MaxColors from "./lints/max-colors";
import ColorBlind from "./lints/blind-check";
import BackgroundDifferentiability from "./lints/background-differentiability";

Expand Down Expand Up @@ -37,17 +36,6 @@ test("ColorLint - ColorNameDiscriminability", async () => {
expect(colorNames.length).toBe(2);
});

test("ColorLint - MaxColors", async () => {
const examplePal = makePalFromHexes([...new Array(15)].map(() => "#006cc6"));
const exampleLint = new MaxColors(examplePal).run();
expect(exampleLint.passes).toBe(false);
expect(exampleLint.message).toBe(
"This palette has too many colors (15) and may be hard to discriminate in some contexts. Maximum: 10."
);
const fix = await exampleLint.suggestFix().then((x) => x[0]);
expect(fix.colors.length).toBe(9);
});

test("ColorLint - ColorBlind", async () => {
const tableau10 = [
"#0078b4",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/lint-language/LintLanguage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ test("LintLanguage Measure DeltaE", () => {
right: 100.00000248106656,
},
};
const result = LLEval(program, toPal([]), { debugCompare: true });
const result = LLEval(program, toPal([]), { debugCompare: false });
expect(prettyPrintLL(program)).toBe(
"deltaE(#000, #fff, 2000) == 100.00000248106656"
);
Expand Down

0 comments on commit 60bd1e7

Please sign in to comment.