diff --git a/test/mocha/directives.js b/test/mocha/directives.js index bc763ae096a..5189f1ad318 100644 --- a/test/mocha/directives.js +++ b/test/mocha/directives.js @@ -176,7 +176,7 @@ describe("Directives", function() { }); it("Should test EXPECT_DIRECTIVE RegExp", function() { - var tests = [ + [ ["", true], ["'test';", true], ["'test';;", true], @@ -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() { diff --git a/test/run-tests.js b/test/run-tests.js index 3d291416ff1..4870873dc38 100755 --- a/test/run-tests.js +++ b/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"); diff --git a/tools/exports.js b/tools/exports.js index d83739d573a..09acc13ec2d 100644 --- a/tools/exports.js +++ b/tools/exports.js @@ -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; -}