Skip to content

Commit

Permalink
Finish.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Feb 4, 2024
1 parent 4c1c640 commit 64a3b6a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/request.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,14 @@ Deno.test("$.request", (t) => {
} catch (err) {
caughtErr = err;
}
assertEquals(caughtErr!, new TimeoutError("Request timed out after 100 milliseconds."));
assert(caughtErr!.stack!.includes("request.test.ts")); // current file
if (isNode) {
// seems like a bug in Node and Chrome where they throw a
// DOMException instead, but not sure
assert(caughtErr != null);
} else {
assertEquals(caughtErr!, new TimeoutError("Request timed out after 100 milliseconds."));
assert(caughtErr!.stack!.includes("request.test.ts")); // current file
}
});

step("ability to abort while waiting", async () => {
Expand Down

0 comments on commit 64a3b6a

Please sign in to comment.