| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,7 +18,7 @@ assert.strictEqual(result, 'function'); | |||
| 18 | 18 | // Test 2: vm.runInContext | |
| 19 | 19 | var sandbox2 = { foo: 'bar' }; | |
| 20 | 20 | var context = vm.createContext(sandbox2); | |
| 21 | - var result = vm.runInContext( | ||
| 21 | + result = vm.runInContext( | ||
| 22 | 22 | 'baz = foo; this.typeofProcess = typeof process; typeof Object;', | |
| 23 | 23 | context | |
| 24 | 24 | ); | |
@@ -30,15 +30,15 @@ assert.deepEqual(sandbox2, { | |||
| 30 | 30 | assert.strictEqual(result, 'function'); | |
| 31 | 31 | ||
| 32 | 32 | // Test 3: vm.runInThisContext | |
| 33 | - var result = vm.runInThisContext( | ||
| 33 | + result = vm.runInThisContext( | ||
| 34 | 34 | 'vmResult = "foo"; Object.prototype.toString.call(process);' | |
| 35 | 35 | ); | |
| 36 | 36 | assert.strictEqual(global.vmResult, 'foo'); | |
| 37 | 37 | assert.strictEqual(result, '[object process]'); | |
| 38 | 38 | delete global.vmResult; | |
| 39 | 39 | ||
| 40 | 40 | // Test 4: vm.runInNewContext | |
| 41 | - var result = vm.runInNewContext( | ||
| 41 | + result = vm.runInNewContext( | ||
| 42 | 42 | 'vmResult = "foo"; typeof process;' | |
| 43 | 43 | ); | |
| 44 | 44 | assert.strictEqual(global.vmResult, undefined); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -87,7 +87,7 @@ proc.once('exit', common.mustCall(function(exitCode, signalCode) { | |||
| 87 | 87 | assert.equal(signalCode, null); | |
| 88 | 88 | })); | |
| 89 | 89 | ||
| 90 | - var proc = spawn(process.execPath, [script, 'handle-fatal-exception']); | ||
| 90 | + proc = spawn(process.execPath, [script, 'handle-fatal-exception']); | ||
| 91 | 91 | proc.stdout.on('data', common.fail); | |
| 92 | 92 | proc.stderr.on('data', common.fail); | |
| 93 | 93 | proc.once('exit', common.mustCall(function(exitCode, signalCode) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,7 @@ assert(typeof sandbox.Proxy === 'object'); | |||
| 13 | 13 | assert(sandbox.Proxy !== Proxy); | |
| 14 | 14 | ||
| 15 | 15 | // Unless we copy the Proxy object explicitly, of course. | |
| 16 | - var sandbox = { Proxy: Proxy }; | ||
| 16 | + sandbox = { Proxy: Proxy }; | ||
| 17 | 17 | vm.runInNewContext('this.Proxy = Proxy', sandbox); | |
| 18 | 18 | assert(typeof sandbox.Proxy === 'object'); | |
| 19 | 19 | assert(sandbox.Proxy === Proxy); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,7 @@ assert(typeof sandbox.Symbol === 'function'); | |||
| 10 | 10 | assert(sandbox.Symbol !== Symbol); | |
| 11 | 11 | ||
| 12 | 12 | // Unless we copy the Symbol constructor explicitly, of course. | |
| 13 | - var sandbox = { Symbol: Symbol }; | ||
| 13 | + sandbox = { Symbol: Symbol }; | ||
| 14 | 14 | vm.runInNewContext('this.Symbol = Symbol', sandbox); | |
| 15 | 15 | assert(typeof sandbox.Symbol === 'function'); | |
| 16 | 16 | assert(sandbox.Symbol === Symbol); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments