summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorLively <lala7573@gmail.com>2020-10-10 14:20:24 +0900
committerGitHub <noreply@github.com>2020-10-10 16:20:24 +1100
commit782e6a2ed5d76bb5a154c56d7daf4607e5bdb93f (patch)
tree505c40daa7a32289a7850933f0da3328ca336681 /cli/tests
parentf4c3d501206e64cf5dfcffb4489bd5ddc0b70051 (diff)
fix(op_crate/web): add padding on URLSearchParam (#7905)
Fixes #7888
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/unit/url_search_params_test.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/tests/unit/url_search_params_test.ts b/cli/tests/unit/url_search_params_test.ts
index 96b524265..41b277129 100644
--- a/cli/tests/unit/url_search_params_test.ts
+++ b/cli/tests/unit/url_search_params_test.ts
@@ -179,6 +179,12 @@ unitTest(function urlSearchParamsMissingPair(): void {
assertEquals(searchParams.toString(), "c=4&a=54");
});
+unitTest(function urlSearchParamsForShortEncodedChar(): void {
+ const init = { linefeed: "\n", tab: "\t" };
+ const searchParams = new URLSearchParams(init);
+ assertEquals(searchParams.toString(), "linefeed=%0A&tab=%09");
+});
+
// If pair does not contain exactly two items, then throw a TypeError.
// ref https://url.spec.whatwg.org/#interface-urlsearchparams
unitTest(function urlSearchParamsShouldThrowTypeError(): void {