()
| 22 | .mockReturnValue({ width, height } as DOMRect); |
| 23 | |
| 24 | const capture = () => { |
| 25 | const seen: { current: HTMLElement } = { current: undefined as never }; |
| 26 | |
| 27 | jest |
| 28 | .spyOn(XMLSerializer.prototype, 'serializeToString') |
| 29 | .mockImplementation((node) => { |
| 30 | seen.current = node as HTMLElement; |
| 31 | |
| 32 | return ''; |
| 33 | }); |
| 34 | |
| 35 | return seen; |
| 36 | }; |
| 37 | |
| 38 | const paints = (blob: Blob | null) => { |
| 39 | const ctx = { scale: jest.fn(), drawImage: jest.fn() }; |