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

Function test

test/unit-tolerant-parse.mjs:93–103  ·  view source on GitHub ↗
(name, fn)

Source from the content-addressed store, hash-verified

91let failed = 0;
92
93function test(name, fn) {
94 try {
95 fn();
96 console.log(` ✅ ${name}`);
97 passed++;
98 } catch (e) {
99 console.error(` ❌ ${name}`);
100 console.error(` ${e.message}`);
101 failed++;
102 }
103}
104
105function assert(condition, msg) {
106 if (!condition) throw new Error(msg || 'Assertion failed');

Callers 1

Calls 2

logMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected