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

Function assertTrue

example/tests/early_inject_page_test.js:59–63  ·  view source on GitHub ↗
(condition, message)

Source from the content-addressed store, hash-verified

57
58// assertTrue(condition, message) - 断言条件为真
59function assertTrue(condition, message) {
60 if (!condition) {
61 throw new Error(message || "断言失败: 期望条件为真");
62 }
63}
64
65console.log("%c=== 早期脚本 GM API 测试开始 ===", "color: blue; font-size: 16px; font-weight: bold;");
66

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected