SIGN IN SIGN UP
denoland / deno UNCLAIMED

A modern runtime for JavaScript and TypeScript.

0 0 17 Rust

chore: test vm SourceTextModule default import (#34598)

Adds a regression test for `import vm from "node:vm"` constructing and
evaluating `new vm.SourceTextModule(...)`, matching denoland/deno#31783.
The runtime implementation is already present on current main; this pins
the reported default-import constructor path and namespace evaluation
behavior.

Verification:
- `target/debug/deno eval 'import vm from "node:vm"; const context =
vm.createContext({}); const module = new vm.SourceTextModule("export
const answer = 42;", { context }); await module.link(() => {}); await
module.evaluate(); console.log(module.namespace.answer);'`\n- `./x
test-node "vm SourceTextModule"`\n- `./x test-node vm`\n-
`target/debug/deno fmt --check tests/unit_node/vm_test.ts`\n\nCloses
denoland/orchid#361

Co-authored-by: divybot <divybot@users.noreply.github.com>
Co-authored-by: Divy Srivastava <me@littledivy.com>
E
em committed
812f60124a3c6c42a79e94877a95c1c9db7b1bc8
Parent: 8c09a51
Committed by GitHub <noreply@github.com> on 5/31/2026, 6:48:44 AM