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

Function test

test/unit-handler-truncation.mjs:6–17  ·  view source on GitHub ↗
(name, fn)

Source from the content-addressed store, hash-verified

4let failed = 0;
5
6function test(name, fn) {
7 try {
8 fn();
9 console.log(` OK ${name}`);
10 passed++;
11 } catch (error) {
12 const message = error instanceof Error ? error.message : String(error);
13 console.error(` FAIL ${name}`);
14 console.error(` ${message}`);
15 failed++;
16 }
17}
18
19function assertEqual(actual, expected, message) {
20 if (actual !== expected) {

Callers 1

Calls 2

logMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected