diff options
Diffstat (limited to 'test/parallel')
-rw-r--r-- | test/parallel/test-querystring.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/parallel/test-querystring.js b/test/parallel/test-querystring.js index e2591d7090..17fa6df924 100644 --- a/test/parallel/test-querystring.js +++ b/test/parallel/test-querystring.js @@ -138,6 +138,14 @@ qsWeirdObjects.forEach(function(testCase) { assert.equal(testCase[1], qs.stringify(testCase[0])); }); +// coerce numbers to string +assert.strictEqual('foo=0', qs.stringify({ foo: 0 })); +assert.strictEqual('foo=0', qs.stringify({ foo: -0 })); +assert.strictEqual('foo=3', qs.stringify({ foo: 3 })); +assert.strictEqual('foo=-72.42', qs.stringify({ foo: -72.42 })); +assert.strictEqual('foo=', qs.stringify({ foo: NaN })); +assert.strictEqual('foo=', qs.stringify({ foo: Infinity })); + // nested var f = qs.stringify({ a: 'b', |