mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
parent
59825a95b4
commit
74bb09aa38
2 changed files with 17 additions and 0 deletions
|
@ -32,6 +32,21 @@ Deno.test(function urlParsing() {
|
|||
);
|
||||
});
|
||||
|
||||
Deno.test(function emptyUrl() {
|
||||
assertThrows(
|
||||
// @ts-ignore for test
|
||||
() => new URL(),
|
||||
TypeError,
|
||||
"1 argument required, but only 0 present",
|
||||
);
|
||||
assertThrows(
|
||||
// @ts-ignore for test
|
||||
() => URL.canParse(),
|
||||
TypeError,
|
||||
"1 argument required, but only 0 present",
|
||||
);
|
||||
});
|
||||
|
||||
Deno.test(function urlProtocolParsing() {
|
||||
assertEquals(new URL("Aa+-.1://foo").protocol, "aa+-.1:");
|
||||
assertEquals(new URL("aA+-.1://foo").protocol, "aa+-.1:");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue