Skip to content

Commit be17f36

Browse files
committed
update testing
1 parent d4429ad commit be17f36

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ describe('parse', () => {
4545
test('url=http%3A%2F%2Fcap32.com%2Fquery%3Fa%3D2%26b%3D1', () => {
4646
expect(parse('url=http%3A%2F%2Fcap32.com%2Fquery%3Fa%3D2%26b%3D1')).toEqual({ url: 'http://cap32.com/query?a=2&b=1' });
4747
});
48+
49+
test('foo=bar&abc=xyz&abc=123', () => {
50+
expect(parse('foo=bar&abc=xyz&abc=123')).toEqual({ foo: 'bar', abc: ['xyz', '123'] });
51+
});
4852
});
4953

5054
describe('stringify', () => {
@@ -79,4 +83,8 @@ describe('stringify', () => {
7983
test("{ a: ['b', 'c'], 'a ': 'd dd', '': '', e: 'f' }", () => {
8084
expect(stringify({ a: ['b', 'c'], 'a ': 'd dd', '': '', e: 'f' })).toBe('a=b&a=c&a+=d+dd&=&e=f');
8185
});
86+
87+
test("{ foo: 'bar', baz: ['qux', 'quux'], corge: '' }", () => {
88+
expect(stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' })).toBe('foo=bar&baz=qux&baz=quux&corge=');
89+
});
8290
});

0 commit comments

Comments
 (0)