more TS fixes + tests
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 6m4s
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 6m4s
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user