more TS fixes + tests
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 6m4s

This commit is contained in:
2025-11-29 16:39:36 -08:00
parent 020edfc675
commit e8a8beb4cb
4 changed files with 19 additions and 11 deletions

View File

@@ -36,11 +36,16 @@ describe('FlyerCorrectionTool', () => {
) as Mocked<typeof fetch>;
// Mock canvas methods for jsdom environment
window.HTMLCanvasElement.prototype.getContext = () => ({
clearRect: vi.fn(),
strokeRect: vi.fn(),
setLineDash: vi.fn(),
} as any);
window.HTMLCanvasElement.prototype.getContext = vi.fn((contextId: string) => {
if (contextId === '2d') {
return {
clearRect: vi.fn(),
strokeRect: vi.fn(),
setLineDash: vi.fn(),
} as unknown as CanvasRenderingContext2D;
}
return null;
}) as any;
});
it('should not render when isOpen is false', () => {