MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / test

Function test

example/tests/window_message_test.js:60–72  ·  view source on GitHub ↗
(name, fn)

Source from the content-addressed store, hash-verified

58 }
59
60 async function test(name, fn) {
61 results.total++;
62 try {
63 await fn();
64 results.passed++;
65 console.log(`%cPASS ${name}`, "color: green;");
66 return true;
67 } catch (error) {
68 results.failed++;
69 console.error(`%cFAIL ${name}`, "color: red;", error);
70 return false;
71 }
72 }
73
74 section("Sandbox endpoint");
75

Callers 1

Calls 2

logMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected