Skip to content

Commit 7185d46

Browse files
committed
Added test for array key values.
1 parent f51491f commit 7185d46

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,16 @@ describe('query-stringifier', function () {
1818
var queryString = qs.stringify(obj);
1919

2020
expect(queryString).to.equal('food=pizza&bar=chocolate');
21-
})
21+
});
22+
it('a value can be an array that that gets to a csv', function() {
23+
var test3 = {
24+
'column': ['a', 'b', 'c'],
25+
'anotherCol': 2
26+
};
27+
var queryString = qs.stringify(test3);
28+
29+
expect(queryString).to.equal('column=a,b,c&anotherCol=2');
30+
});
2231
});
2332

2433
describe('#parse', function () {

0 commit comments

Comments
 (0)