mirror of
https://github.com/rails/execjs
synced 2023-03-27 23:21:20 -04:00
Normalize global
This commit is contained in:
parent
1816df22d1
commit
afe05cdf2e
2 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
(function(program, execJS) { execJS(program) })(function(module, exports, require, console, setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, clearImmediate) { #{source}
|
||||
(function(program, execJS) { execJS(program) })(function(global, module, exports, require, console, setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, clearImmediate) { #{source}
|
||||
}, function(program) {
|
||||
var output, print = function(string) {
|
||||
process.stdout.write('' + string);
|
||||
|
|
|
@ -221,6 +221,7 @@ class TestExecJS < Test
|
|||
end
|
||||
|
||||
def test_commonjs_vars_are_undefined
|
||||
assert ExecJS.eval("typeof global == 'undefined'")
|
||||
assert ExecJS.eval("typeof module == 'undefined'")
|
||||
assert ExecJS.eval("typeof exports == 'undefined'")
|
||||
assert ExecJS.eval("typeof require == 'undefined'")
|
||||
|
|
Loading…
Reference in a new issue