1
0
Fork 0
mirror of https://github.com/rails/execjs synced 2023-03-27 23:21:20 -04:00

Ensure console is undefined

This commit is contained in:
Joshua Peek 2012-05-20 12:26:19 -05:00
parent f061eae84e
commit ac113e62ab

View file

@ -139,6 +139,10 @@ class TestExecJS < Test::Unit::TestCase
assert ExecJS.eval("typeof require == 'undefined'")
end
def test_console_is_undefined
assert ExecJS.eval("typeof console == 'undefined'")
end
def test_compile_large_scripts
body = "var foo = 'bar';\n" * 100_000
assert ExecJS.exec("function foo() {\n#{body}\n};\nreturn true")