summaryrefslogtreecommitdiff
path: root/test/parallel/test-querystring.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2016-07-12 19:47:32 -0400
committercjihrig <cjihrig@gmail.com>2016-07-14 22:07:14 -0400
commit4a408321d9c4a6964c9d89a0dd09067f36b4dbfc (patch)
tree5014fee0b2ef8772f4ebf60fd4bf27a72b0ef5b9 /test/parallel/test-querystring.js
parent4220c24b17955f7f627bcedc89b6c2a0e655e618 (diff)
downloadandroid-node-v8-4a408321d9c4a6964c9d89a0dd09067f36b4dbfc.tar.gz
android-node-v8-4a408321d9c4a6964c9d89a0dd09067f36b4dbfc.tar.bz2
android-node-v8-4a408321d9c4a6964c9d89a0dd09067f36b4dbfc.zip
test: cleanup IIFE tests
A number of test files use IIFEs to separate distinct tests from each other in the same file. The project has been moving toward using block scopes and let/const in favor of IIFEs. This commit moves IIFE tests to block scopes. Some additional cleanup such as use of strictEqual() and common.mustCall() is also included. PR-URL: https://github.com/nodejs/node/pull/7694 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Diffstat (limited to 'test/parallel/test-querystring.js')
-rw-r--r--test/parallel/test-querystring.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/parallel/test-querystring.js b/test/parallel/test-querystring.js
index 5d52fe6544..37cf66705d 100644
--- a/test/parallel/test-querystring.js
+++ b/test/parallel/test-querystring.js
@@ -134,7 +134,7 @@ qsNoMungeTestCases.forEach(function(testCase) {
});
// test the nested qs-in-qs case
-(function() {
+{
const f = qs.parse('a=b&q=x%3Dy%26y%3Dz');
check(f, createWithNoPrototype([
{ key: 'a', value: 'b'},
@@ -147,10 +147,10 @@ qsNoMungeTestCases.forEach(function(testCase) {
{key: 'y', value: 'z' }
]);
check(f.q, expectedInternal);
-})();
+}
// nested in colon
-(function() {
+{
const f = qs.parse('a:b;q:x%3Ay%3By%3Az', ';', ':');
check(f, createWithNoPrototype([
{key: 'a', value: 'b'},
@@ -162,7 +162,7 @@ qsNoMungeTestCases.forEach(function(testCase) {
{key: 'y', value: 'z' }
]);
check(f.q, expectedInternal);
-})();
+}
// now test stringifying