Skip to content

Commit 2e6ec1e

Browse files
committed
add URL.canParse test
1 parent 7808d12 commit 2e6ec1e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/tests/url/url.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,11 @@
9999
_ = new URL("://foo.bar/path?query#fragment");
100100
});
101101
</script>
102+
103+
<script id=URL.canParse>
104+
testing.expectEqual(true, URL.canParse("https://lightpanda.io"));
105+
testing.expectEqual(false, URL.canParse("://lightpanda.io"));
106+
107+
testing.expectEqual(true, URL.canParse("/home", "https://lightpanda.io"));
108+
testing.expectEqual(false, URL.canParse("lightpanda.io", "https"));
109+
</script>

0 commit comments

Comments
 (0)