opencode/packages/codemode-rust/conformance/cases/host-require-dynamic-import.js
kommander b7ebfb4b48 test(codemode): cover extensions and tool calls against the reference
Adds host- conformance cases for invalid input, unknown tools, namespaces,
search browsing, chaining, validation and counting, and missing modules, with
expectations generated from the reference, and Rust tests mirroring the
reference's extension tests. HostValue::to_json keeps integral numbers as
integers.
2026-11-18 18:54:15 +01:00

5 lines
219 B
JavaScript

const errors = []
try { require("fs") } catch (e) { errors.push(e.message) }
try { await import("child_process") } catch (e) { errors.push(e.message) }
try { require(1) } catch (e) { errors.push(e.name) }
return errors