/** @overview nodeunit test case. */

var testResource = require('../../../test_resource'),
    minifyJsFiles = require('../../../../task/worker/minify_js_files.js');

exports.setUp = function (done) {
    done();
};

exports.tearDown = function (done) {
    done();
};


exports['Minify js files.'] = function (test) {
    var workDir = testResource.resolveWorkFile('work_minify_js_files');
    testResource.prepareCleanWorkDir(workDir, function () {
        minifyJsFiles({
            srcDir: testResource.resolveMockFile('.'),
            pattern: '*.js',
            ignore: '*.min.js',
            destDir: workDir
        }, function (err) {
            test.ifError(err);
            test.done();
        });
    });
};