diff options
author | Rich Trott <rtrott@gmail.com> | 2016-01-30 21:46:45 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2016-02-02 12:48:08 -0800 |
commit | 8d61787f177e3002b87227d71f0b9707c7bb73d6 (patch) | |
tree | 56ef211648c11f4585a76882e2413e9d85d8acbc /test/parallel/test-querystring.js | |
parent | 415625c2a50eb8067e89df0e87c24fb8228f34d4 (diff) | |
download | android-node-v8-8d61787f177e3002b87227d71f0b9707c7bb73d6.tar.gz android-node-v8-8d61787f177e3002b87227d71f0b9707c7bb73d6.tar.bz2 android-node-v8-8d61787f177e3002b87227d71f0b9707c7bb73d6.zip |
test: fix variable redeclarations
I'm a fan of small changesets, but even I'm getting a little annoyed at
me for opening all these PRs weeding out variable redeclarations. So I'm
bundling a bunch of small changes here.
PR-URL: https://github.com/nodejs/node/pull/4992
Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-querystring.js')
-rw-r--r-- | test/parallel/test-querystring.js | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/test/parallel/test-querystring.js b/test/parallel/test-querystring.js index f30d0a3cb2..b438885249 100644 --- a/test/parallel/test-querystring.js +++ b/test/parallel/test-querystring.js @@ -148,29 +148,32 @@ assert.strictEqual('foo=', qs.stringify({ foo: NaN })); assert.strictEqual('foo=', qs.stringify({ foo: Infinity })); // nested -var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }) -}); -assert.equal(f, 'a=b&q=x%3Dy%26y%3Dz'); +{ + const f = qs.stringify({ + a: 'b', + q: qs.stringify({ + x: 'y', + y: 'z' + }) + }); + assert.equal(f, 'a=b&q=x%3Dy%26y%3Dz'); +} assert.doesNotThrow(function() { qs.parse(undefined); }); // nested in colon -var f = qs.stringify({ - a: 'b', - q: qs.stringify({ - x: 'y', - y: 'z' - }, ';', ':') -}, ';', ':'); -assert.equal(f, 'a:b;q:x%3Ay%3By%3Az'); - +{ + const f = qs.stringify({ + a: 'b', + q: qs.stringify({ + x: 'y', + y: 'z' + }, ';', ':') + }, ';', ':'); + assert.equal(f, 'a:b;q:x%3Ay%3By%3Az'); +} assert.deepEqual({}, qs.parse()); |