diff options
Diffstat (limited to 'test/js/node')
-rw-r--r-- | test/js/node/net/node-net.test.ts | 7 | ||||
-rw-r--r-- | test/js/node/process/process.test.js | 6 |
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"); }); |