mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
test : improved code by removing ts-ignore had to add any because not able to find exact type
This commit is contained in:
parent
cf816ca71f
commit
d8bc145af0
1 changed files with 1 additions and 4 deletions
|
@ -69,7 +69,7 @@ describe("isCustomColor", () => {
|
|||
});
|
||||
|
||||
describe("getMostUsedCustomColors", () => {
|
||||
const elements = [
|
||||
const elements:readonly any[] = [
|
||||
{
|
||||
type: "rectangle",
|
||||
id: "1",
|
||||
|
@ -109,7 +109,6 @@ describe("getMostUsedCustomColors", () => {
|
|||
it("should return the most used custom colors for element background", () => {
|
||||
const type = "elementBackground";
|
||||
|
||||
// @ts-ignore
|
||||
const result = getMostUsedCustomColors(elements, type, palette);
|
||||
|
||||
expect(result).toEqual(["#FF0000"]);
|
||||
|
@ -118,7 +117,6 @@ describe("getMostUsedCustomColors", () => {
|
|||
it("should return the most used custom colors for element stroke", () => {
|
||||
const type = "elementStroke";
|
||||
|
||||
// @ts-ignore
|
||||
const result = getMostUsedCustomColors(elements, type, palette);
|
||||
|
||||
expect(result).toEqual(["#00FF00"]);
|
||||
|
@ -136,7 +134,6 @@ describe("getMostUsedCustomColors", () => {
|
|||
it("should handle empty palette correctly", () => {
|
||||
const type = "elementBackground";
|
||||
const emptyPalette = {};
|
||||
// @ts-ignore
|
||||
const result = getMostUsedCustomColors(elements, type, emptyPalette);
|
||||
|
||||
expect(result).toEqual([]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue