mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
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:
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),
|
||||
|
||||
Reference in new issue
Block a user