test: explicitly set global in test-repl
authorRich Trott <rtrott@gmail.com>
Sun, 3 Apr 2016 06:20:12 +0000 (23:20 -0700)
committerMyles Borins <mborins@us.ibm.com>
Mon, 11 Apr 2016 16:57:36 +0000 (12:57 -0400)
The test intentionally assigns a global. Use `global` namespace to make
it clear that it is intentional and not an accidental leak.

PR-URL: https://github.com/nodejs/node/pull/6026
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
test/parallel/test-repl.js

index dcafb99..33530cf 100644 (file)
@@ -24,7 +24,7 @@ var moduleFilename = require('path').join(common.fixturesDir, 'a');
 console.error('repl test');
 
 // function for REPL to run
-invoke_me = function(arg) {
+global.invoke_me = function(arg) {
   return 'invoked ' + arg;
 };