diff options
author | JohannLai <johann_lai@outlook.com> | 2020-07-17 00:08:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-16 12:08:29 -0400 |
commit | d60f9c2549c7dfb0fbd6c9c8984c215f5dd75e76 (patch) | |
tree | 54868ba9873932337754be35b77707d145d1a44c /cli/tests/unit | |
parent | de3416689175214f33b226d4c510da63737c0db9 (diff) |
fix(cli/js/web): IPv6 hostname should be compressed (#6772)
Diffstat (limited to 'cli/tests/unit')
-rw-r--r-- | cli/tests/unit/url_test.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/tests/unit/url_test.ts b/cli/tests/unit/url_test.ts index 15833633a..b50f6a25b 100644 --- a/cli/tests/unit/url_test.ts +++ b/cli/tests/unit/url_test.ts @@ -44,6 +44,8 @@ unitTest(function urlHostnameParsing(): void { assertEquals(new URL("http://[::1]").hostname, "[::1]"); assertEquals(new URL("file://[::1]").hostname, "[::1]"); assertEquals(new URL("abcd://[::1]").hostname, "[::1]"); + assertEquals(new URL("http://[0:f:0:0:f:f:0:0]").hostname, "[0:f::f:f:0:0]"); + assertEquals(new URL("http://[0:0:5:6:7:8]").hostname, "[::5:6:7:8]"); // Forbidden host code point. assertThrows(() => new URL("http:// a"), TypeError, "Invalid URL."); |