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

Function fileOf

packages/shared/src/lib/downscaleImage.spec.ts:5–6  ·  view source on GitHub ↗
(size: number, type: string, name = 'photo.jpg')

Source from the content-addressed store, hash-verified

3const MB = 1024 * 1024;
4
5const fileOf = (size: number, type: string, name = 'photo.jpg'): File =>
6 new File([new Uint8Array(size)], name, { type });
7
8describe('downscaleImage', () => {
9 const drawImage = jest.fn();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected