Skip to content

Commit

Permalink
temp reverts
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Jan 31, 2025
1 parent e9a7752 commit 092705f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/unit/blob_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Deno.test(async function blobStream() {
const read = async (): Promise<void> => {
const { done, value } = await reader.read();
if (!done && value) {
bytes = concat([bytes, value]) as Uint8Array<ArrayBuffer>;
bytes = concat([bytes, value]);
return read();
}
};
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export {
unreachable,
} from "@std/assert";
export { delay } from "@std/async/delay";
export { readLines } from "@std/io/read-lines";
export { parseArgs } from "@std/cli/parse-args";

export function pathToAbsoluteFileUrl(path: string): URL {
Expand Down
11 changes: 6 additions & 5 deletions tests/unit/tls_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
assertStrictEquals,
assertThrows,
} from "./test_util.ts";
import { Buffer } from "@std/streams/buffer";
import { BufReader, BufWriter } from "@std/io";
import { readAll } from "@std/io/read-all";
import { writeAll } from "@std/io/write-all";
import { TextProtoReader } from "../testdata/run/textproto.ts";
Expand Down Expand Up @@ -114,11 +114,12 @@ Deno.test(
);

const conn = await Deno.connectTls({ hostname, port, caCerts });
const buffer = new Buffer(conn);
const w = buffer.writable.getWriter();
const r = buffer.readable.getWriter();
const w = new BufWriter(conn);
const r = new BufReader(conn);
const body = `GET / HTTP/1.1\r\nHost: ${hostname}:${port}\r\n\r\n`;
await w.write(encoder.encode(body));
const writeResult = await w.write(encoder.encode(body));
assertEquals(body.length, writeResult);
await w.flush();
const tpr = new TextProtoReader(r);
const statusLine = await tpr.readLine();
assert(statusLine !== null, `line must be read: ${String(statusLine)}`);
Expand Down
2 changes: 1 addition & 1 deletion tests/util/std
Submodule std updated from c5d793 to ace6a0

0 comments on commit 092705f

Please sign in to comment.