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

Function assertTrue

example/tests/early_inject_content_test.js:60–64  ·  view source on GitHub ↗
(condition, message)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected