Skip to content

Commit fc78b6d

Browse files
authored
improve mocha tests (#3195)
1 parent 012ddd6 commit fc78b6d

22 files changed

Lines changed: 562 additions & 581 deletions

test/mocha/arguments.js

Lines changed: 2 additions & 5 deletions
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+
});

test/mocha/comment-filter.js

Lines changed: 0 additions & 89 deletions
This file was deleted.

test/mocha/comment.js

Lines changed: 0 additions & 262 deletions
This file was deleted.

0 commit comments

Comments
 (0)