Skip to content

Commit 6427722

Browse files
authoredOct 5, 2020
Add tests to confirm existing number parsing behavior (#284)
1 parent 7f09a53 commit 6427722

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎test/parse.js

+5
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ test('handle `+` correctly', t => {
7575
t.deepEqual(queryString.parse('foo+faz=bar+baz++'), {'foo faz': 'bar baz '});
7676
});
7777

78+
test('parses numbers with exponential notation as string', t => {
79+
t.deepEqual(queryString.parse('192e11=bar'), {'192e11': 'bar'});
80+
t.deepEqual(queryString.parse('bar=192e11'), {bar: '192e11'});
81+
});
82+
7883
test('handle `+` correctly when not decoding', t => {
7984
t.deepEqual(queryString.parse('foo+faz=bar+baz++', {decode: false}), {'foo+faz': 'bar+baz++'});
8085
});

0 commit comments

Comments
 (0)
Please sign in to comment.