diff options
author | Rich Trott <rtrott@gmail.com> | 2016-01-28 23:02:57 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2016-01-31 18:06:26 -0800 |
commit | 185f8497e5b7138f2ede5d76e3a25933137cef69 (patch) | |
tree | f4d3b6832da0e67394ee00e6e80dc608a3ed2c3a /test/parallel/test-child-process-default-options.js | |
parent | 1800bf4142e77899df30fd7c673c26e7f7c5dcd1 (diff) | |
download | android-node-v8-185f8497e5b7138f2ede5d76e3a25933137cef69.tar.gz android-node-v8-185f8497e5b7138f2ede5d76e3a25933137cef69.tar.bz2 android-node-v8-185f8497e5b7138f2ede5d76e3a25933137cef69.zip |
test: scope redeclared vars in test-child-process*
A handful of child process tests had variables declared multiple times
in the same scope using `var`. This change scopes those declarations.
PR-URL: https://github.com/nodejs/node/pull/4944
Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Diffstat (limited to 'test/parallel/test-child-process-default-options.js')
-rw-r--r-- | test/parallel/test-child-process-default-options.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/parallel/test-child-process-default-options.js b/test/parallel/test-child-process-default-options.js index f11a2678f6..38a1b291b9 100644 --- a/test/parallel/test-child-process-default-options.js +++ b/test/parallel/test-child-process-default-options.js @@ -6,10 +6,11 @@ var spawn = require('child_process').spawn; process.env.HELLO = 'WORLD'; +var child; if (common.isWindows) { - var child = spawn('cmd.exe', ['/c', 'set'], {}); + child = spawn('cmd.exe', ['/c', 'set'], {}); } else { - var child = spawn('/usr/bin/env', [], {}); + child = spawn('/usr/bin/env', [], {}); } var response = ''; |