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

Function test

test/unit-openai-stream-usage.mjs:13–25  ·  view source on GitHub ↗
(name, fn)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

logMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected