MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / makeMockFile

Function makeMockFile

src/parsers/writers.test.ts:21–23  ·  view source on GitHub ↗

* Create a File with a working arrayBuffer() method for jsdom.

(data: Uint8Array, name: string, type = 'image/png')

Source from the content-addressed store, hash-verified

19 * Create a File with a working arrayBuffer() method for jsdom.
20 */
21function makeMockFile(data: Uint8Array, name: string, type = 'image/png'): File {
22 return buildReadableBinaryFile({ contents: data, name, type });
23}
24
25afterEach(() => {
26 vi.restoreAllMocks();

Callers 1

writers.test.tsFile · 0.70

Calls 1

buildReadableBinaryFileFunction · 0.90

Tested by

no test coverage detected