MCPcopy Create free account
hub / github.com/dailydotdev/apps / capture

Function capture

packages/shared/src/features/interests/nodeToPng.spec.ts:24–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 .mockReturnValue({ width, height } as DOMRect);
23
24const 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
38const paints = (blob: Blob | null) => {
39 const ctx = { scale: jest.fn(), drawImage: jest.fn() };

Callers 1

nodeToPng.spec.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected