summaryrefslogtreecommitdiff
path: root/cli/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit')
-rw-r--r--cli/tests/unit/url_test.ts18
1 files changed, 11 insertions, 7 deletions
diff --git a/cli/tests/unit/url_test.ts b/cli/tests/unit/url_test.ts
index ed8ae5500..438e80892 100644
--- a/cli/tests/unit/url_test.ts
+++ b/cli/tests/unit/url_test.ts
@@ -272,26 +272,30 @@ unitTest(function urlTrim() {
unitTest(function urlEncoding() {
assertEquals(
- new URL("https://a !$&*()=,;+'\"@example.com").username,
+ new URL("http://a !$&*()=,;+'\"@example.com").username,
"a%20!$&*()%3D,%3B+%27%22",
);
assertEquals(
- new URL("https://:a !$&*()=,;+'\"@example.com").password,
+ new URL("http://:a !$&*()=,;+'\"@example.com").password,
"a%20!$&*()%3D,%3B+%27%22",
);
- assertEquals(new URL("abcde://mañana/c?d#e").hostname, "ma%C3%B1ana");
// https://url.spec.whatwg.org/#idna
- assertEquals(new URL("https://mañana/c?d#e").hostname, "xn--maana-pta");
+ assertEquals(new URL("http://mañana/c?d#e").hostname, "xn--maana-pta");
+ assertEquals(new URL("abcd://mañana/c?d#e").hostname, "ma%C3%B1ana");
assertEquals(
- new URL("https://example.com/a ~!@$&*()=:/,;+'\"\\").pathname,
+ new URL("http://example.com/a ~!@$&*()=:/,;+'\"\\").pathname,
"/a%20~!@$&*()=:/,;+'%22/",
);
assertEquals(
- new URL("https://example.com?a ~!@$&*()=:/,;?+'\"\\").search,
+ new URL("http://example.com?a ~!@$&*()=:/,;?+'\"\\").search,
"?a%20~!@$&*()=:/,;?+%27%22\\",
);
assertEquals(
- new URL("https://example.com#a ~!@#$&*()=:/,;?+'\"\\").hash,
+ new URL("abcd://example.com?a ~!@$&*()=:/,;?+'\"\\").search,
+ "?a%20~!@$&*()=:/,;?+'%22\\",
+ );
+ assertEquals(
+ new URL("http://example.com#a ~!@#$&*()=:/,;?+'\"\\").hash,
"#a%20~!@#$&*()=:/,;?+'%22\\",
);
});