mirror of
https://github.com/denoland/deno.git
synced 2025-01-11 08:33:43 -05:00
fix(node): add writable and readable fields to FakeSocket (#19931)
Closes https://github.com/denoland/deno/issues/19927
This commit is contained in:
parent
3d35900639
commit
bd79baea5e
2 changed files with 4 additions and 0 deletions
|
@ -352,6 +352,8 @@ Deno.test("[node/http] send request with non-chunked body", async () => {
|
|||
assertEquals(requestBody, "hello world");
|
||||
});
|
||||
req.on("socket", (socket) => {
|
||||
assert(socket.writable);
|
||||
assert(socket.readable);
|
||||
socket.setKeepAlive();
|
||||
socket.destroy();
|
||||
});
|
||||
|
|
|
@ -279,6 +279,8 @@ class FakeSocket extends EventEmitter {
|
|||
this.remoteAddress = opts.hostname;
|
||||
this.remotePort = opts.port;
|
||||
this.encrypted = opts.encrypted;
|
||||
this.writable = true;
|
||||
this.readable = true;
|
||||
}
|
||||
|
||||
setKeepAlive() {}
|
||||
|
|
Loading…
Reference in a new issue