aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/stubs.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/js/node/stubs.test.js')
-rw-r--r--test/js/node/stubs.test.js19
1 files changed, 1 insertions, 18 deletions
diff --git a/test/js/node/stubs.test.js b/test/js/node/stubs.test.js
index 11d8edbd9..057215c4f 100644
--- a/test/js/node/stubs.test.js
+++ b/test/js/node/stubs.test.js
@@ -89,24 +89,7 @@ for (let specifier of specifiers) {
if ("default" in mod) {
expect(mod).toHaveProperty("default");
} else {
- // TODO: uncomment this after node:module can be default imported
- // throw new Error(`Module ${specifier} has no default export`);
+ throw new Error(`Module ${specifier} has no default export`);
}
});
}
-
-// TODO: when node:vm is implemented, delete this test.
-test("node:vm", () => {
- const { Script } = import.meta.require("node:vm");
- try {
- // **This line should appear in the stack trace**
- // That way it shows the "real" line causing the issue
- // Instead of several layers of wrapping
- new Script("1 + 1");
- throw new Error("unreacahble");
- } catch (e) {
- const msg = Bun.inspect(e);
- expect(msg).not.toContain("node:vm:");
- expect(msg).toContain("**This line should appear in the stack trace**");
- }
-});