diff --git a/src/components/effects/ink-data-morph.test.tsx b/src/components/effects/ink-data-morph.test.tsx index 143e6b1..f8ed106 100644 --- a/src/components/effects/ink-data-morph.test.tsx +++ b/src/components/effects/ink-data-morph.test.tsx @@ -10,20 +10,32 @@ class MockCanvasContext { fillStyle = ''; strokeStyle = ''; lineWidth = 0; + lineCap = ''; + globalAlpha = 1; + globalCompositeOperation = 'source-over'; beginPath = jest.fn(); arc = jest.fn(); + ellipse = jest.fn(); fill = jest.fn(); stroke = jest.fn(); moveTo = jest.fn(); lineTo = jest.fn(); + quadraticCurveTo = jest.fn(); + closePath = jest.fn(); save = jest.fn(); restore = jest.fn(); clearRect = jest.fn(); fillRect = jest.fn(); setTransform = jest.fn(); + translate = jest.fn(); + rotate = jest.fn(); createRadialGradient = jest.fn(() => ({ addColorStop: jest.fn(), })); + createLinearGradient = jest.fn(() => ({ + addColorStop: jest.fn(), + })); + createPattern = jest.fn(() => ({})); } describe('InkDataMorph', () => { @@ -100,29 +112,87 @@ describe('InkDataMorph', () => { }); }); - describe('Props', () => { - it('should accept custom colors', () => { + describe('Responsive behavior', () => { + it('should render on mobile viewport with reduced effects', () => { const { container } = render( -