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

Function assertTrue

example/tests/window_message_test.js:46–50  ·  view source on GitHub ↗
(condition, message)

Source from the content-addressed store, hash-verified

44 }
45
46 function assertTrue(condition, message) {
47 if (!condition) {
48 throw new Error(message || "Assertion failed");
49 }
50 }
51
52 function withTimeout(promise, label, ms = 10000) {
53 let timer = null;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected