Make arguments test slightly more strict
authorAnthony Van de Gejuchte <anthonyvdgent@gmail.com>
Thu, 14 Jan 2016 23:04:05 +0000 (00:04 +0100)
committerAnthony Van de Gejuchte <anthonyvdgent@gmail.com>
Thu, 14 Jan 2016 23:04:05 +0000 (00:04 +0100)
test/mocha/arguments.js

index 294a6c1..089826f 100644 (file)
@@ -6,7 +6,10 @@ describe("arguments", function() {
         var ast = UglifyJS.parse("var arguments; var f = function() {arguments.length}");
         ast.figure_out_scope();
 
-        // Select symbol in function
+        // Test scope of `var arguments`
+        assert.strictEqual(ast.find_variable("arguments").global, true);
+
+        // Select arguments symbol in function
         var symbol = ast.body[1].definitions[0].value.find_variable("arguments");
 
         assert.strictEqual(symbol.global, false);