mirror of
https://github.com/rails/execjs
synced 2023-03-27 23:21:20 -04:00
Test timers are undefined
This commit is contained in:
parent
898dc5e32e
commit
6ef718c479
1 changed files with 9 additions and 0 deletions
|
@ -230,6 +230,15 @@ class TestExecJS < Test
|
||||||
assert ExecJS.eval("typeof console == 'undefined'")
|
assert ExecJS.eval("typeof console == 'undefined'")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_timers_are_undefined
|
||||||
|
assert ExecJS.eval("typeof setTimeout == 'undefined'")
|
||||||
|
assert ExecJS.eval("typeof setInterval == 'undefined'")
|
||||||
|
assert ExecJS.eval("typeof clearTimeout == 'undefined'")
|
||||||
|
assert ExecJS.eval("typeof clearInterval == 'undefined'")
|
||||||
|
assert ExecJS.eval("typeof setImmediate == 'undefined'")
|
||||||
|
assert ExecJS.eval("typeof clearImmediate == 'undefined'")
|
||||||
|
end
|
||||||
|
|
||||||
def test_compile_large_scripts
|
def test_compile_large_scripts
|
||||||
body = "var foo = 'bar';\n" * 100_000
|
body = "var foo = 'bar';\n" * 100_000
|
||||||
assert ExecJS.exec("function foo() {\n#{body}\n};\nreturn true")
|
assert ExecJS.exec("function foo() {\n#{body}\n};\nreturn true")
|
||||||
|
|
Loading…
Reference in a new issue