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

Function test

test/unit-proxy-agent.mjs:19–29  ·  view source on GitHub ↗
(name, fn)

Source from the content-addressed store, hash-verified

17let failed = 0;
18
19function test(name, fn) {
20 try {
21 fn();
22 console.log(` ✅ ${name}`);
23 passed++;
24 } catch (e) {
25 console.error(` ❌ ${name}`);
26 console.error(` ${e.message}`);
27 failed++;
28 }
29}
30
31function assert(condition, msg) {
32 if (!condition) throw new Error(msg || 'Assertion failed');

Callers 1

Calls 2

logMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected