Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixed lint problems
  • Loading branch information
IvanJov committed Feb 3, 2017
commit 0db818b8729524aff084b8029464957b3eeffce8
17 changes: 11 additions & 6 deletions test/parallel/test-whatwg-url-searchparams-getall.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,22 @@ test(function() {

test(function() {
var params = new URLSearchParams('a=1&a=2&a=3&a');
assert_true(params.has('a'), `Search params object doesn't have name "a"`);
assert_true(params.has('a'), 'Search params object doesn\'t have name "a"');
var matches = params.getAll('a');
assert(matches);
assert_equals(matches.length, 4, `Unexpected length of name "a" values in search params object: ${matches.length}`);
assert_array_equals(matches, ['1', '2', '3', ''], `Unexpected name "a" values: ${matches}`);
assert_equals(matches.length, 4, `Unexpected length of name "a" values in
search params object: ${matches.length}`);
assert_array_equals(matches, ['1', '2', '3', ''], `Unexpected name "a"
values: ${matches}`);
params.set('a', 'one');
assert_equals(params.get('a'), 'one', `Search params object doesn't have name "a" with value "one"`);
assert_equals(params.get('a'), 'one', 'Search params object doesn\'t ' +
'have name "a" with value "one"');
matches = params.getAll('a');
assert(matches);
assert_equals(matches.length, 1, `Unexpected length of name "a" values in search params object: ${matches.length}`);
assert_array_equals(matches, ['one'], `Unexpected name "a" values: ${matches}`);
assert_equals(matches.length, 1, `Unexpected length of name "a" values in
search params object: ${matches.length}`);
assert_array_equals(matches, ['one'], `Unexpected name "a" values:
${matches}`);
}, 'getAll() multiples');
/* eslint-enable */

Expand Down