deno.land / x / zipjs@v2.7.43 / tests / node-runner.js

node-runner.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* global globalThis */
import { test, mock, beforeEach } from "node:test";import { setMaxListeners } from "node:events";import { openAsBlob } from "node:fs";
import tests from "./tests-data.js";
setMaxListeners(100);
beforeEach(() => globalThis.fetch = mock.fn(async (url) => { const blob = await openAsBlob("." + url.toString().match(/(\/data\/.*)/)[1]); return { status: 200, body: blob.stream(), arrayBuffer: () => blob.arrayBuffer() };}));
for (const testData of tests) { if (!testData.env || testData.env.includes("node")) { test({ name: testData.title, fn: async () => (await import("./all/" + testData.script)).test() }); }}
zipjs

Version Info

Tagged at
3 weeks ago