diff options
author | Yusuke Tanaka <yusuktan@maguro.dev> | 2020-08-27 04:01:03 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-26 15:01:03 -0400 |
commit | 6d964fc607f78b1652a4e04e8a7cf3672fac9d61 (patch) | |
tree | ee666cbbce8ba7e09563d7ff45240d2c21449405 /cli/tests/unit/url_test.ts | |
parent | 4a0bc747dd043e6f02e744dd1bb256ac9027c7c0 (diff) |
test(url_test): disable `no-self-assign` rule here (#7204)
Diffstat (limited to 'cli/tests/unit/url_test.ts')
-rw-r--r-- | cli/tests/unit/url_test.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/tests/unit/url_test.ts b/cli/tests/unit/url_test.ts index 438e80892..e71f07036 100644 --- a/cli/tests/unit/url_test.ts +++ b/cli/tests/unit/url_test.ts @@ -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"); }); @@ -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"); }); |