MCPcopy Create free account
hub / github.com/CaviraOSS/OpenReason / main

Function main

tests/math.test.ts:3–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import openreason from "../src/index"
2
3async function main() {
4 openreason.init({ provider: "mock" as any, apiKey: "", model: "mock" })
5 const res = await openreason.reason("What is 2 + 2?")
6 console.log("mode:", res.mode)
7 console.log("domain:", res.domain)
8 console.log("verdict:", res.verdict)
9 if (!(typeof res.confidence === "number" && res.confidence >= 0 && res.confidence <= 1)) {
10 throw new Error("Confidence out of range")
11 }
12 console.log("✅ math.test passed")
13}
14main().catch(e => { console.error(e); process.exit(1) })

Callers 1

math.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected