Skip to content

Commit

Permalink
test(url_test): disable no-self-assign rule here (#7204)
Browse files Browse the repository at this point in the history
  • Loading branch information
magurotuna authored Aug 26, 2020
1 parent 4a0bc74 commit 6d964fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/tests/unit/url_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,13 @@ unitTest(function urlNormalize(): void {
unitTest(function urlModifyPathname(): void {
const url = new URL("http://foo.bar/baz%qat/qux%quux");
assertEquals(url.pathname, "/baz%qat/qux%quux");
// Self-assignment is to invoke the setter.
// deno-lint-ignore no-self-assign
url.pathname = url.pathname;
assertEquals(url.pathname, "/baz%qat/qux%quux");
url.pathname = "baz#qat qux";
assertEquals(url.pathname, "/baz%23qat%20qux");
// deno-lint-ignore no-self-assign
url.pathname = url.pathname;
assertEquals(url.pathname, "/baz%23qat%20qux");
});
Expand All @@ -195,6 +198,7 @@ unitTest(function urlModifyHash(): void {
const url = new URL("http://foo.bar");
url.hash = "%foo bar/qat%qux#bar";
assertEquals(url.hash, "#%foo%20bar/qat%qux#bar");
// deno-lint-ignore no-self-assign
url.hash = url.hash;
assertEquals(url.hash, "#%foo%20bar/qat%qux#bar");
});
Expand Down

0 comments on commit 6d964fc

Please sign in to comment.