aboutsummaryrefslogtreecommitdiff
path: root/test/js/node
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-10-02 12:31:07 -0700
committerGravatar dave caruso <me@paperdave.net> 2023-10-02 12:31:07 -0700
commitabbe3916ed5d7b6adb5a4b376e5c563d36e07d31 (patch)
tree2dba62d3d15c0842eb70067f67bd81d95a4abdad /test/js/node
parent4073539837e2fc60860ddb231a71c9a34c388afd (diff)
parent0a2d490bf8cb0dbfe3ccfc936d71b33fb9c59899 (diff)
downloadbun-abbe3916ed5d7b6adb5a4b376e5c563d36e07d31.tar.gz
bun-abbe3916ed5d7b6adb5a4b376e5c563d36e07d31.tar.zst
bun-abbe3916ed5d7b6adb5a4b376e5c563d36e07d31.zip
Merge remote-tracking branch 'origin/main' into dave/nodemodule-preloadmodules
Diffstat (limited to 'test/js/node')
-rw-r--r--test/js/node/net/node-net.test.ts7
-rw-r--r--test/js/node/process/process.test.js6
2 files changed, 11 insertions, 2 deletions
diff --git a/test/js/node/net/node-net.test.ts b/test/js/node/net/node-net.test.ts
index 109391af5..a16ac6db1 100644
--- a/test/js/node/net/node-net.test.ts
+++ b/test/js/node/net/node-net.test.ts
@@ -411,3 +411,10 @@ it("should handle connection error (unix)", done => {
done();
});
});
+
+it("Socket has a prototype", () => {
+ function Connection() {}
+ function Connection2() {}
+ require("util").inherits(Connection, Socket);
+ require("util").inherits(Connection2, require("tls").TLSSocket);
+});
diff --git a/test/js/node/process/process.test.js b/test/js/node/process/process.test.js
index a4a8862a2..4fb678dce 100644
--- a/test/js/node/process/process.test.js
+++ b/test/js/node/process/process.test.js
@@ -407,7 +407,8 @@ describe("signal", () => {
stdout: "pipe",
});
const prom = child.exited;
- process.kill(child.pid, "SIGTERM");
+ const ret = process.kill(child.pid, "SIGTERM");
+ expect(ret).toBe(true);
await prom;
expect(child.signalCode).toBe("SIGTERM");
});
@@ -418,7 +419,8 @@ describe("signal", () => {
stdout: "pipe",
});
const prom = child.exited;
- process.kill(child.pid, 9);
+ const ret = process.kill(child.pid, 9);
+ expect(ret).toBe(true);
await prom;
expect(child.signalCode).toBe("SIGKILL");
});