deno.land / std@0.166.0 / node / querystring_test.ts

querystring_test.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.import { assertEquals } from "../testing/asserts.ts";import { parse, stringify } from "./querystring.ts";
Deno.test({ name: "stringify", fn() { assertEquals( stringify({ a: "hello", b: 5, c: true, d: ["foo", "bar"], }), "a=hello&b=5&c=true&d=foo&d=bar", ); },});
Deno.test({ name: "parse", fn() { assertEquals(parse("a=hello&b=5&c=true&d=foo&d=bar"), { a: "hello", b: "5", c: "true", d: ["foo", "bar"], }); },});
std
Deno standard library
GitHub Repositorydenoland/deno_std
GitHub Stars
2447

Version Info

Tagged at
2 months ago