summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-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 {