Skip to content

Commit

Permalink
remove UGLIFY_DEBUG (#1720)
Browse files Browse the repository at this point in the history
fixes #1719
  • Loading branch information
alexlamsl committed Mar 28, 2017
1 parent eb48a03 commit ec7f37f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
13 changes: 7 additions & 6 deletions test/mocha/directives.js
Expand Up @@ -176,7 +176,7 @@ describe("Directives", function() {
});

it("Should test EXPECT_DIRECTIVE RegExp", function() {
var tests = [
[
["", true],
["'test';", true],
["'test';;", true],
Expand All @@ -185,11 +185,12 @@ describe("Directives", function() {
["'tests'; \n\t", true],
["'tests';\n\n", true],
["\n\n\"use strict\";\n\n", true]
];

for (var i = 0; i < tests.length; i++) {
assert.strictEqual(uglify.EXPECT_DIRECTIVE.test(tests[i][0]), tests[i][1], tests[i][0]);
}
].forEach(function(test) {
var out = uglify.OutputStream();
out.print(test[0]);
out.print_string("", null, true);
assert.strictEqual(out.get() === test[0] + ';""', test[1], test[0]);
});
});

it("Should only print 2 semicolons spread over 2 lines in beautify mode", function() {
Expand Down
2 changes: 0 additions & 2 deletions test/run-tests.js
@@ -1,7 +1,5 @@
#! /usr/bin/env node

global.UGLIFY_DEBUG = true;

var U = require("../tools/node");
var path = require("path");
var fs = require("fs");
Expand Down
4 changes: 0 additions & 4 deletions tools/exports.js
Expand Up @@ -17,7 +17,3 @@ exports["string_template"] = string_template;
exports["tokenizer"] = tokenizer;
exports["is_identifier"] = is_identifier;
exports["SymbolDef"] = SymbolDef;

if (global.UGLIFY_DEBUG) {
exports["EXPECT_DIRECTIVE"] = EXPECT_DIRECTIVE;
}

0 comments on commit ec7f37f

Please sign in to comment.