Skip to content

Commit

Permalink
Add tests for #381
Browse files Browse the repository at this point in the history
Closes #381
  • Loading branch information
sindresorhus committed Feb 28, 2024
1 parent f4b5983 commit 3d8fbf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/parse-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ test('handles strings with query string', t => {
t.deepEqual(queryString.parseUrl('https://foo.bar#top?foo=bar'), {url: 'https://foo.bar', query: {}});
t.deepEqual(queryString.parseUrl('https://foo.bar?foo=bar&foo=baz#top'), {url: 'https://foo.bar', query: {foo: ['bar', 'baz']}});
t.deepEqual(queryString.parseUrl('https://foo.bar?foo=bar&foo=baz'), {url: 'https://foo.bar', query: {foo: ['bar', 'baz']}});
t.deepEqual(queryString.parseUrl('https://foo.bar?foo=null'), {url: 'https://foo.bar', query: {foo: 'null'}});
});

test('handles strings not containing query string', t => {
Expand Down
1 change: 1 addition & 0 deletions test/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ test('query strings ending with a `&`', t => {

test('parse a query string', t => {
t.deepEqual(queryString.parse('foo=bar'), {foo: 'bar'});
t.deepEqual(queryString.parse('foo=null'), {foo: 'null'});
});

test('parse multiple query string', t => {
Expand Down

0 comments on commit 3d8fbf2

Please sign in to comment.