From ac113e62ab777d8df6322a2b3c295024ccd2cb38 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sun, 20 May 2012 12:26:19 -0500 Subject: [PATCH] Ensure console is undefined --- test/test_execjs.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_execjs.rb b/test/test_execjs.rb index 6a0d763..34896a0 100644 --- a/test/test_execjs.rb +++ b/test/test_execjs.rb @@ -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")