mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
Revert "Use the same parse processing at contractor of URL with setters (#1549)"
Right now every instance of URL which has a basePath passed will share
the same instance of parts, so a change to one of them will change them
all.
https://github.com/denoland/deno/pull/1549#issuecomment-455896081
This reverts commit 9e1f5ccb8b
.
This commit is contained in:
parent
106fe1f762
commit
7eb74ba0d6
2 changed files with 17 additions and 57 deletions
|
@ -31,19 +31,6 @@ test(function urlParsing() {
|
|||
);
|
||||
});
|
||||
|
||||
test(function constractorParsing() {
|
||||
const url = new URL("http://どめいん.com/ぱす?きー=ばりゅー#はっしゅ");
|
||||
const { host, pathname, search, hash } = url;
|
||||
url.host = "どめいん.com";
|
||||
url.pathname = "/ぱす";
|
||||
url.search = "?きー=ばりゅー";
|
||||
url.hash = "#はっしゅ";
|
||||
assertEqual(host, url.host);
|
||||
assertEqual(pathname, url.pathname);
|
||||
assertEqual(search, url.search);
|
||||
assertEqual(hash, url.hash);
|
||||
});
|
||||
|
||||
test(function urlModifications() {
|
||||
const url = new URL(
|
||||
"https://foo:bar@baz.qat:8000/qux/quux?foo=bar&baz=12#qat"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue