test: add test for URLSearchParams inspection

The member methods of URLSearchParams should split across multiple
lines with `util.inspect` depending on an option `breakLength`.

PR-URL: https://github.com/nodejs/node/pull/11428
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
Daijiro Wachi authored and Michaël Zasso committed 2017-02-18 15:51:04 +01:00
1 parent d0d02b6c88
commit 8629b3339d
1 file changed
+2
@@ -13,6 +13,8 @@ assert.strictEqual(util.inspect(sp.keys()),
"URLSearchParamsIterator { 'a', 'b', 'b' }");
assert.strictEqual(util.inspect(sp.values()),
"URLSearchParamsIterator { 'a', 'b', 'c' }");
assert.strictEqual(util.inspect(sp.keys(), {breakLength: 1}),
"URLSearchParamsIterator {\n 'a',\n 'b',\n 'b' }");
const iterator = sp.entries();
assert.strictEqual(util.inspect(iterator),