Skip to content

Commit 71d7a44

Browse files
Trottrvagg
authored andcommitted
test: fix redeclared vars in test-vm-*
PR-URL: #4997 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 5503092 commit 71d7a44

4 files changed

+6
-6
lines changed

test/parallel/test-vm-basic.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ assert.strictEqual(result, 'function');
1818
// Test 2: vm.runInContext
1919
var sandbox2 = { foo: 'bar' };
2020
var context = vm.createContext(sandbox2);
21-
var result = vm.runInContext(
21+
result = vm.runInContext(
2222
'baz = foo; this.typeofProcess = typeof process; typeof Object;',
2323
context
2424
);
@@ -30,15 +30,15 @@ assert.deepEqual(sandbox2, {
3030
assert.strictEqual(result, 'function');
3131

3232
// Test 3: vm.runInThisContext
33-
var result = vm.runInThisContext(
33+
result = vm.runInThisContext(
3434
'vmResult = "foo"; Object.prototype.toString.call(process);'
3535
);
3636
assert.strictEqual(global.vmResult, 'foo');
3737
assert.strictEqual(result, '[object process]');
3838
delete global.vmResult;
3939

4040
// Test 4: vm.runInNewContext
41-
var result = vm.runInNewContext(
41+
result = vm.runInNewContext(
4242
'vmResult = "foo"; typeof process;'
4343
);
4444
assert.strictEqual(global.vmResult, undefined);

test/parallel/test-vm-debug-context.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ proc.once('exit', common.mustCall(function(exitCode, signalCode) {
8787
assert.equal(signalCode, null);
8888
}));
8989

90-
var proc = spawn(process.execPath, [script, 'handle-fatal-exception']);
90+
proc = spawn(process.execPath, [script, 'handle-fatal-exception']);
9191
proc.stdout.on('data', common.fail);
9292
proc.stderr.on('data', common.fail);
9393
proc.once('exit', common.mustCall(function(exitCode, signalCode) {

test/parallel/test-vm-harmony-proxies.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ assert(typeof sandbox.Proxy === 'object');
1313
assert(sandbox.Proxy !== Proxy);
1414

1515
// Unless we copy the Proxy object explicitly, of course.
16-
var sandbox = { Proxy: Proxy };
16+
sandbox = { Proxy: Proxy };
1717
vm.runInNewContext('this.Proxy = Proxy', sandbox);
1818
assert(typeof sandbox.Proxy === 'object');
1919
assert(sandbox.Proxy === Proxy);

test/parallel/test-vm-harmony-symbols.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ assert(typeof sandbox.Symbol === 'function');
1010
assert(sandbox.Symbol !== Symbol);
1111

1212
// Unless we copy the Symbol constructor explicitly, of course.
13-
var sandbox = { Symbol: Symbol };
13+
sandbox = { Symbol: Symbol };
1414
vm.runInNewContext('this.Symbol = Symbol', sandbox);
1515
assert(typeof sandbox.Symbol === 'function');
1616
assert(sandbox.Symbol === Symbol);

0 commit comments

Comments
 (0)