MCPcopy
hub / github.com/7836246/cursor2api / test

Function test

test/unit-vision.mjs:11–21  ·  view source on GitHub ↗
(name, fn)

Source from the content-addressed store, hash-verified

9let failed = 0;
10
11async function test(name, fn) {
12 try {
13 await fn();
14 console.log(` ✅ ${name}`);
15 passed++;
16 } catch (e) {
17 console.error(` ❌ ${name}`);
18 console.error(` ${e.message}`);
19 failed++;
20 }
21}
22
23function assert(condition, msg) {
24 if (!condition) throw new Error(msg || 'Assertion failed');

Callers 1

unit-vision.mjsFile · 0.70

Calls 2

logMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected