Skip to content

Commit

Permalink
add test, go resolves subdomain destination
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanThatOneKid committed Sep 17, 2024
1 parent ce10c86 commit 677e0cb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions go_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,10 @@ Deno.test("go returns passed URL if invalid or not found", () => {
assertEquals(go(input, {}), input, `failed on ${input}`);
});
});

Deno.test("go resolves subdomain destination", () => {
const expected = new URL("https://foobar.example.com/example");
const input = new URL("https://example.com/foo/bar");
const actual = go(input, { "foo/bar": "https://foobar.example.com/example" });
assertEquals(actual.href, expected.href);
});

0 comments on commit 677e0cb

Please sign in to comment.