mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
fix: http/_mock_conn.ts (#1926)
This commit is contained in:
parent
a9f6a1c4a7
commit
658340bad4
@ -24,6 +24,22 @@ export function mockConn(base: Partial<Deno.Conn> = {}): Deno.Conn {
|
||||
return Promise.resolve(-1);
|
||||
},
|
||||
close: (): void => {},
|
||||
readable: new ReadableStream({
|
||||
type: "bytes",
|
||||
async pull(_controller) {
|
||||
},
|
||||
cancel() {
|
||||
},
|
||||
autoAllocateChunkSize: 1,
|
||||
}),
|
||||
writable: new WritableStream({
|
||||
async write(_chunk, _controller) {
|
||||
},
|
||||
close() {
|
||||
},
|
||||
abort() {
|
||||
},
|
||||
}),
|
||||
// TODO(ry) Remove the following ts-ignore.
|
||||
// @ts-ignore This was added to workaround incompatibilities between Deno versions.
|
||||
setNoDelay: (_nodelay?: boolean): void => {},
|
||||
|
Loading…
Reference in New Issue
Block a user