Browse Source

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>
v7.x
Daijiro Wachi 8 years ago
committed by Italo A. Casas
parent
commit
8e455a9093
No known key found for this signature in database GPG Key ID: 23EFEFE93C4CFFFE
  1. 2
      test/parallel/test-whatwg-url-searchparams-inspect.js

2
test/parallel/test-whatwg-url-searchparams-inspect.js

@ -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),

Loading…
Cancel
Save