Make arguments test slightly more strict

This commit is contained in:
Anthony Van de Gejuchte
2016-01-15 00:04:05 +01:00
parent 5c4e470d43
commit 8439c8ba98

View 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);