diff --git a/lib/object_to_query_param_string.js b/lib/object_to_query_param_string.js index 445abce7..b10b8889 100644 --- a/lib/object_to_query_param_string.js +++ b/lib/object_to_query_param_string.js @@ -1,4 +1,3 @@ -// istanbul ignore file 'use strict'; var isArray = require('lodash/isArray'); diff --git a/test/object_to_query_param_string.test.js b/test/object_to_query_param_string.test.js index 71dd4db8..68b09cdf 100644 --- a/test/object_to_query_param_string.test.js +++ b/test/object_to_query_param_string.test.js @@ -43,6 +43,7 @@ describe('objectToQueryParamString', function() { it('serializes arrays', function() { expect(objectToQueryParamString({arr: [1]})).toBe(encodeURIComponent('arr[]') + '=1'); + expect(objectToQueryParamString({'arr[]': [1]})).toBe(encodeURIComponent('arr[]') + '=1'); expect(objectToQueryParamString({arr: [1, 2]})).toBe( [ encodeURIComponent('arr[]'),