diff options
-rw-r--r-- | test/js/node/vm/vm.test.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/js/node/vm/vm.test.ts b/test/js/node/vm/vm.test.ts index 6cf187112..1aba597c7 100644 --- a/test/js/node/vm/vm.test.ts +++ b/test/js/node/vm/vm.test.ts @@ -1,6 +1,7 @@ import { describe, test, expect } from "bun:test"; import { createContext, runInContext, runInNewContext, runInThisContext, Script } from "node:vm"; +function capture(_: any, _1?: any) {} describe("runInContext()", () => { testRunInContext(runInContext, { isIsolated: true }); }); @@ -133,6 +134,7 @@ function testRunInContext( }); test("cannot access local scope", () => { var foo = "bar"; // intentionally unused + capture(foo, foo); const context = createContext({}); const result = fn("typeof foo;", context); expect(result).toBe("undefined"); |