The vitest mock hoisting errors were already fixed in commit 7686974. CrossReferencePanel.test.ts and WorkerAnalyticsPanel.test.ts both use vi.hoisted() correctly and all 2399 tests pass. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
841 B
841 B
bf-5klc: Verification - Already Fixed
Status
Bead is closed. The fix was already applied in commit 7686974fa796ccfd32e7dad2a62f20b665b9f877.
Fix Applied
The vitest mock hoisting errors in both test files were resolved using vi.hoisted():
CrossReferencePanel.test.ts
- Used
vi.hoisted()to declare mock functions (mockGetEntity,mockGetLinksForEntity,mockGetStats,mockFindPath) - Factory functions now reference these hoisted variables instead of top-level consts
WorkerAnalyticsPanel.test.ts
- Used
vi.hoisted()to declareMockWorkerAnalyticsclass - Mock factory references the hoisted class
Verification
All tests pass:
- CrossReferencePanel.test.ts: 43 tests passing
- WorkerAnalyticsPanel.test.ts: 64 tests passing
- Full suite: 2399 tests passing
Date Verified
2026-05-02 17:12 UTC