aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/process/process.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/js/node/process/process.test.js')
-rw-r--r--test/js/node/process/process.test.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/js/node/process/process.test.js b/test/js/node/process/process.test.js
index 91479108f..539a92f2c 100644
--- a/test/js/node/process/process.test.js
+++ b/test/js/node/process/process.test.js
@@ -478,3 +478,13 @@ for (const stub of emptyArrayStubs) {
expect(process[stub]).toHaveLength(0);
});
}
+
+it("dlopen args parsing", () => {
+ expect(() => process.dlopen({ module: "42" }, "/tmp/not-found.so")).toThrow();
+ expect(() => process.dlopen({ module: 42 }, "/tmp/not-found.so")).toThrow();
+ expect(() => process.dlopen({ module: { exports: "42" } }, "/tmp/not-found.so")).toThrow();
+ expect(() => process.dlopen({ module: { exports: 42 } }, "/tmp/not-found.so")).toThrow();
+ expect(() => process.dlopen({ module: Symbol() }, "/tmp/not-found.so")).toThrow();
+ expect(() => process.dlopen({ module: { exports: Symbol("123") } }, "/tmp/not-found.so")).toThrow();
+ expect(() => process.dlopen({ module: { exports: Symbol("123") } }, Symbol("badddd"))).toThrow();
+});