Skip to content

Commit 2833091

Browse files
committed
improve mocha tests (#3195)
1 parent 766a414 commit 2833091

22 files changed

+562
-581
lines changed

Diff for: test/mocha/arguments.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
var UglifyJS = require("../node");
21
var assert = require("assert");
2+
var UglifyJS = require("../..");
33

44
describe("arguments", function() {
55
it("Should known that arguments in functions are local scoped", function() {
66
var ast = UglifyJS.parse("var arguments; var f = function() {arguments.length}");
77
ast.figure_out_scope();
8-
98
// Test scope of `var arguments`
109
assert.strictEqual(ast.find_variable("arguments").global, true);
11-
1210
// Select arguments symbol in function
1311
var symbol = ast.body[1].definitions[0].value.find_variable("arguments");
14-
1512
assert.strictEqual(symbol.global, false);
1613
assert.strictEqual(symbol.scope, ast. // From ast
1714
body[1]. // Select 2nd statement (equals to `var f ...`)
@@ -27,4 +24,4 @@ describe("arguments", function() {
2724
assert.strictEqual(ast.body[0].body[0].uses_arguments, true);
2825
assert.strictEqual(ast.body[0].body[0].body[0].uses_arguments, false);
2926
});
30-
});
27+
});

Diff for: test/mocha/comment-filter.js

-89
This file was deleted.

Diff for: test/mocha/comment.js

-262
This file was deleted.

0 commit comments

Comments
 (0)