summaryrefslogtreecommitdiff
path: root/tests/test_language.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_language.js')
-rw-r--r--tests/test_language.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_language.js b/tests/test_language.js
index 75f5cdc..0e9bb31 100644
--- a/tests/test_language.js
+++ b/tests/test_language.js
@@ -420,8 +420,12 @@ function test_argument_scope()
var f;
var c = "global";
- f = function(a = eval("var arguments")) {};
- assert_throws(SyntaxError, f);
+ (function() {
+ "use strict";
+ // XXX: node only throws in strict mode
+ f = function(a = eval("var arguments")) {};
+ assert_throws(SyntaxError, f);
+ })();
f = function(a = eval("1"), b = arguments[0]) { return b; };
assert(f(12), 12);