summaryrefslogtreecommitdiff
path: root/test/parallel/test-vm-static-this.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-05-14 16:16:33 +0200
committerRuben Bridgewater <ruben@bridgewater.de>2018-05-19 17:55:57 +0200
commitbecc3ec372baeef0a4b89923968d874010966c49 (patch)
treed2b29d41da5e3ebde58d2ae04612e28b988c6b28 /test/parallel/test-vm-static-this.js
parentf954aba39ee02193beb2dbddc6c0ea0edcca7c74 (diff)
downloadandroid-node-v8-becc3ec372baeef0a4b89923968d874010966c49.tar.gz
android-node-v8-becc3ec372baeef0a4b89923968d874010966c49.tar.bz2
android-node-v8-becc3ec372baeef0a4b89923968d874010966c49.zip
test: remove common.globalCheck
This flag is partially used in tests where it was not necessary and it is always possible to replace this flag with `common.allowGlobals`. This makes sure all globals are truly tested for. PR-URL: https://github.com/nodejs/node/pull/20717 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'test/parallel/test-vm-static-this.js')
-rw-r--r--test/parallel/test-vm-static-this.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/parallel/test-vm-static-this.js b/test/parallel/test-vm-static-this.js
index 5306e31dc0..d4530604dc 100644
--- a/test/parallel/test-vm-static-this.js
+++ b/test/parallel/test-vm-static-this.js
@@ -24,8 +24,6 @@ const common = require('../common');
const assert = require('assert');
const vm = require('vm');
-common.globalCheck = false;
-
// Run a string
const result = vm.runInThisContext('\'passed\';');
assert.strictEqual('passed', result);
@@ -58,3 +56,10 @@ assert.strictEqual(1, global.foo);
global.f = function() { global.foo = 100; };
vm.runInThisContext('f()');
assert.strictEqual(100, global.foo);
+
+common.allowGlobals(
+ global.hello,
+ global.foo,
+ global.obj,
+ global.f
+);