mirror of
https://github.com/rails/execjs
synced 2023-03-27 23:21:20 -04:00
Test browser self is also undefined
This commit is contained in:
parent
1bf999b0fd
commit
59e0d04b51
1 changed files with 4 additions and 0 deletions
|
@ -220,6 +220,10 @@ class TestExecJS < Test
|
||||||
assert_equal true, ExecJS.exec("return this === (function() {return this})()")
|
assert_equal true, ExecJS.exec("return this === (function() {return this})()")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_browser_self_is_undefined
|
||||||
|
assert ExecJS.eval("typeof self == 'undefined'")
|
||||||
|
end
|
||||||
|
|
||||||
def test_node_global_is_undefined
|
def test_node_global_is_undefined
|
||||||
assert ExecJS.eval("typeof global == 'undefined'")
|
assert ExecJS.eval("typeof global == 'undefined'")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue