From 59e0d04b5164aa4bb19adcf20f43e205dcee4968 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 3 Feb 2015 13:49:13 -0800 Subject: [PATCH] Test browser self is also undefined --- test/test_execjs.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_execjs.rb b/test/test_execjs.rb index f963c10..20b8a53 100644 --- a/test/test_execjs.rb +++ b/test/test_execjs.rb @@ -220,6 +220,10 @@ class TestExecJS < Test assert_equal true, ExecJS.exec("return this === (function() {return this})()") end + def test_browser_self_is_undefined + assert ExecJS.eval("typeof self == 'undefined'") + end + def test_node_global_is_undefined assert ExecJS.eval("typeof global == 'undefined'") end