Revision 852f78491a212ba20841847436dab93abb0a8181 authored by Ondřej Španěl on 24 February 2017, 00:51:24 UTC, committed by Alex Lam S.L on 24 February 2017, 00:51:24 UTC
Makes direct usage within web browser easier, even if officially unsupported.
1 parent 229e42c
huge-number-of-comments.js
var Uglify = require('../../');
var assert = require("assert");
describe("Huge number of comments.", function() {
it("Should parse and compress code with thousands of consecutive comments", function() {
var js = 'function lots_of_comments(x) { return 7 -';
var i;
for (i = 1; i <= 5000; ++i) { js += "// " + i + "\n"; }
for (; i <= 10000; ++i) { js += "/* " + i + " */ /**/"; }
js += "x; }";
var result = Uglify.minify(js, {
fromString: true,
mangle: false,
compress: {}
});
assert.strictEqual(result.code, "function lots_of_comments(x){return 7-x}");
});
});
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...