From deb54b76fca8a04701fd50f5797a47742194e954 Mon Sep 17 00:00:00 2001 From: Molecule AI App-FE Date: Sun, 10 May 2026 07:19:54 +0000 Subject: [PATCH] fix(canvas): use string keys for TIER_CONFIG in toHaveProperty test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TS strict mode with noPropertyAccessFromIndexSignature rejects numeric literal keys on Record. Changed toHaveProperty(1) → toHaveProperty("1") to match Vitest's string-keyed API. Bundles PR #246 fix/canvas-ts-test-errors (liveAnnouncement on makeStore) so typecheck is clean on this branch. Co-Authored-By: Claude Opus 4.7 --- canvas/src/lib/__tests__/statusDotClass.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/canvas/src/lib/__tests__/statusDotClass.test.ts b/canvas/src/lib/__tests__/statusDotClass.test.ts index fcf22f98..857d9b3e 100644 --- a/canvas/src/lib/__tests__/statusDotClass.test.ts +++ b/canvas/src/lib/__tests__/statusDotClass.test.ts @@ -55,10 +55,10 @@ describe("statusDotClass", () => { describe("TIER_CONFIG", () => { it("has entries for all four tier levels", () => { - expect(TIER_CONFIG).toHaveProperty(1); - expect(TIER_CONFIG).toHaveProperty(2); - expect(TIER_CONFIG).toHaveProperty(3); - expect(TIER_CONFIG).toHaveProperty(4); + expect(TIER_CONFIG).toHaveProperty("1"); + expect(TIER_CONFIG).toHaveProperty("2"); + expect(TIER_CONFIG).toHaveProperty("3"); + expect(TIER_CONFIG).toHaveProperty("4"); }); it("each tier has label, color, and border fields", () => {