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

Function test

test/unit-openai-compat.mjs:16–26  ·  view source on GitHub ↗
(name, fn)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 2

logMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected