From d21eedefd4affd6a72161d6064264a585fd1c020 Mon Sep 17 00:00:00 2001 From: alfredorubin96 Date: Thu, 30 Apr 2026 15:33:55 +0200 Subject: [PATCH] fix(types): resolve pre-existing type errors on release/2.0 Fix implicit `any` parameter types in plugin-hardening.test.ts and add missing chart component stubs (GanttChart, CirclePackingChart, ChoroplethChart) to the chart-helpers.test.ts mock so dynamic imports resolve correctly. Co-Authored-By: Claude Opus 4.6 (1M context) --- app/src/lib/__tests__/plugin/chart-helpers.test.ts | 3 +++ app/src/plugins/__tests__/plugin-hardening.test.ts | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/src/lib/__tests__/plugin/chart-helpers.test.ts b/app/src/lib/__tests__/plugin/chart-helpers.test.ts index bd98fb3c..2e79a4a1 100644 --- a/app/src/lib/__tests__/plugin/chart-helpers.test.ts +++ b/app/src/lib/__tests__/plugin/chart-helpers.test.ts @@ -18,6 +18,9 @@ vi.mock("@neoboard/components", () => ({ SunburstChart: Stub, RadarChart: Stub, TreemapChart: Stub, + GanttChart: Stub, + CirclePackingChart: Stub, + ChoroplethChart: Stub, EmptyState: Stub, Skeleton: Stub, })); diff --git a/app/src/plugins/__tests__/plugin-hardening.test.ts b/app/src/plugins/__tests__/plugin-hardening.test.ts index 24ecbbdf..e15a241b 100644 --- a/app/src/plugins/__tests__/plugin-hardening.test.ts +++ b/app/src/plugins/__tests__/plugin-hardening.test.ts @@ -110,7 +110,7 @@ describe("plugin hardening", () => { type: "", label: "X", component: () => null, - transform: (d) => d, + transform: (d: unknown) => d, } as never), ).toThrow("type is required"); }); @@ -121,7 +121,7 @@ describe("plugin hardening", () => { type: "x", label: "", component: () => null, - transform: (d) => d, + transform: (d: unknown) => d, } as never), ).toThrow("label is required"); }); @@ -143,7 +143,7 @@ describe("plugin hardening", () => { type: "test", label: "Test", component: (() => null) as never, - transform: (d) => d, + transform: (d: unknown) => d, options: [{ key: "", label: "X", type: "boolean", default: false }], } as never); expect(spy).toHaveBeenCalledWith( @@ -159,7 +159,7 @@ describe("plugin hardening", () => { type: "test2", label: "Test", component: (() => null) as never, - transform: (d) => d, + transform: (d: unknown) => d, compatibleWith: ["neo4j", ""], } as never); expect(spy).toHaveBeenCalledWith(