From 0d5eb73db00ea584eb2f1be9cb47b3fc0ca93ce0 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Mon, 7 Oct 2024 20:38:31 -0700 Subject: [PATCH] test: add missing vm.runInContext stubs (#14341) --- test/js/node/vm/vm.test.ts | 45 ++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/test/js/node/vm/vm.test.ts b/test/js/node/vm/vm.test.ts index 9adfb20bcbc9b8..f0a66ec2e905ee 100644 --- a/test/js/node/vm/vm.test.ts +++ b/test/js/node/vm/vm.test.ts @@ -272,19 +272,42 @@ function testRunInContext({ fn, isIsolated, isNew }: TestRunInContextArg) { expect(result).toContain("foo.js"); }); } - test.skip("can specify a line offset", () => { - // TODO: use test.todo + test.todo("can specify filename", () => { + // }); - test.skip("can specify a column offset", () => { - // TODO: use test.todo + test.todo("can specify lineOffset", () => { + // }); - test.skip("can specify a timeout", () => { - const context = createContext({}); - const result = () => - fn("while (true) {};", context, { - timeout: 1, - }); - expect(result).toThrow(); // TODO: does not timeout + test.todo("can specify columnOffset", () => { + // + }); + test.todo("can specify displayErrors", () => { + // + }); + test.todo("can specify timeout", () => { + // + }); + test.todo("can specify breakOnSigint", () => { + // + }); + test.todo("can specify cachedData", () => { + // + }); + test.todo("can specify importModuleDynamically", () => { + // + }); + + // https://github.com/oven-sh/bun/issues/10885 .if(isNew == true) + test.todo("can specify contextName", () => { + // + }); + // https://github.com/oven-sh/bun/issues/10885 .if(isNew == true) + test.todo("can specify contextOrigin", () => { + // + }); + // https://github.com/oven-sh/bun/issues/10885 .if(isNew == true) + test.todo("can specify microtaskMode", () => { + // }); }