Skip to content

Commit 2981916

Browse files
committed
Avoid HTTP imports
1 parent 9c25882 commit 2981916

File tree

10 files changed

+21
-29
lines changed

10 files changed

+21
-29
lines changed

channel_test.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
import {
2-
assertEquals,
3-
assertRejects,
4-
} from "https://deno.land/[email protected]/testing/asserts.ts";
5-
import {
6-
deadline,
7-
DeadlineError,
8-
} from "https://deno.land/[email protected]/async/mod.ts";
1+
import { assertEquals, assertRejects } from "@std/assert";
2+
import { deadline, DeadlineError } from "@std/async";
93
import { provide } from "./provide.ts";
104
import { pop } from "./pop.ts";
115
import { push } from "./push.ts";

collect_test.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
import {
2-
assertEquals,
3-
assertRejects,
4-
} from "https://deno.land/[email protected]/testing/asserts.ts";
5-
import {
6-
deadline,
7-
DeadlineError,
8-
} from "https://deno.land/[email protected]/async/deadline.ts";
1+
import { assertEquals, assertRejects } from "@std/assert";
2+
import { deadline, DeadlineError } from "@std/async";
93
import { collect } from "./collect.ts";
104

115
Deno.test("collect returns an empty array for an empty stream", async () => {

deno.jsonc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"tasks": {
3-
"test": "deno test --no-lock --unstable -A --parallel --doc",
4-
"check": "deno check --no-lock --unstable $(find . -name '*.ts')",
5-
"upgrade": "deno run --no-lock -A https://deno.land/x/udd/main.ts $(find . -name '*.ts')"
3+
"test": "deno test -A --parallel --doc --shuffle",
4+
"check": "deno check **/*.ts"
5+
},
6+
"imports": {
7+
"@std/assert": "jsr:@std/assert@^0.221.0",
8+
"@std/async": "jsr:@std/async@^0.221.0",
9+
"@std/bytes": "jsr:@std/bytes@^0.221.0"
610
}
711
}

pipe_through_from_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
1+
import { assertEquals } from "@std/assert";
22
import { collect } from "./collect.ts";
33
import { channel } from "./channel.ts";
44
import { pipeThroughFrom } from "./pipe_through_from.ts";

pop_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
1+
import { assertEquals } from "@std/assert";
22
import { pop } from "./pop.ts";
33

44
Deno.test("pop", async (t) => {

provide_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
1+
import { assertEquals } from "@std/assert";
22
import { provide } from "./provide.ts";
33

44
Deno.test("provide writes all values to stream", async () => {

push_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
1+
import { assertEquals } from "@std/assert";
22
import { push } from "./push.ts";
33

44
Deno.test("push", async (t) => {

read_all.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { concat } from "https://deno.land/[email protected]/bytes/mod.ts";
1+
import { concat } from "@std/bytes";
22
import { collect } from "./collect.ts";
33

44
/**
@@ -33,5 +33,5 @@ export async function readAll(
3333
options: PipeOptions = {},
3434
): Promise<Uint8Array> {
3535
const chunks = await collect(stream, options);
36-
return concat(...chunks);
36+
return concat(chunks);
3737
}

read_all_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
1+
import { assertEquals } from "@std/assert";
22
import { readAll } from "./read_all.ts";
33

44
Deno.test("readAll", async () => {

write_all_test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
2-
import { concat } from "https://deno.land/[email protected]/bytes/mod.ts";
1+
import { assertEquals } from "@std/assert";
2+
import { concat } from "@std/bytes";
33
import { writeAll } from "./write_all.ts";
44

55
Deno.test("writeAll", async (t) => {
@@ -14,7 +14,7 @@ Deno.test("writeAll", async (t) => {
1414
},
1515
});
1616
await writeAll(stream, encoder.encode("HelloWorld"), { chunkSize: 3 });
17-
assertEquals(concat(...chunks), encoder.encode("HelloWorld"));
17+
assertEquals(concat(chunks), encoder.encode("HelloWorld"));
1818
assertEquals(chunks, [
1919
encoder.encode("Hel"),
2020
encoder.encode("loW"),

0 commit comments

Comments
 (0)