aboutsummaryrefslogtreecommitdiff
path: root/test/mocha/minify.js
blob: bbf188c49f39abe996bdadefb14015edcb5b131e (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
var Uglify = require('../../');
var assert = require("assert");

describe("minify", function() {
    it("Should test basic sanity of minify with default options", function() {
        var js = 'function foo(bar) { if (bar) return 3; else return 7; var u = not_called(); }';
        var result = Uglify.minify(js, {fromString: true});
        assert.strictEqual(result.code, 'function foo(n){return n?3:7}');
    });
});