From ece9ef292faf0f1b463984913c398442d7f504b5 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Sat, 2 Sep 2023 16:05:13 +1000 Subject: [PATCH] fix: correct `getCursor()` test location (#482) Fixes #481 --- utils/http_test.ts | 7 ++++++- utils/islands_test.ts | 8 -------- 2 files changed, 6 insertions(+), 9 deletions(-) delete mode 100644 utils/islands_test.ts diff --git a/utils/http_test.ts b/utils/http_test.ts index 46a79a7ff..6937aa422 100644 --- a/utils/http_test.ts +++ b/utils/http_test.ts @@ -1,5 +1,5 @@ // Copyright 2023 the Deno authors. All rights reserved. MIT license. -import { redirect } from "./http.ts"; +import { getCursor, redirect } from "./http.ts"; import { assert, assertEquals } from "std/testing/asserts.ts"; Deno.test("[http] redirect() defaults", () => { @@ -22,3 +22,8 @@ Deno.test("[http] redirect()", () => { assertEquals(resp.headers.get("location"), location); assertEquals(resp.status, status); }); + +Deno.test("[http] getCursor()", () => { + assertEquals(getCursor(new URL("http://example.com")), ""); + assertEquals(getCursor(new URL("http://example.com?cursor=here")), "here"); +}); diff --git a/utils/islands_test.ts b/utils/islands_test.ts deleted file mode 100644 index 5f80c058c..000000000 --- a/utils/islands_test.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2023 the Deno authors. All rights reserved. MIT license. -import { getCursor } from "./http.ts"; -import { assertEquals } from "std/testing/asserts.ts"; - -Deno.test("[http] getCursor()", () => { - assertEquals(getCursor(new URL("http://example.com")), ""); - assertEquals(getCursor(new URL("http://example.com?cursor=here")), "here"); -});