/** @overview nodeunit test case. */

var testResource = require('../../../test_resource'),
    compileCoffeeDirectory = require('../../../../task/worker/compile_coffee_directory.js');

exports.setUp = function (done) {
    process.env.TASK_LOG_DISABLED = true;
    done();
};

exports.tearDown = function (done) {
    process.env.TASK_LOG_DISABLED = false;
    done();
};


exports['Compile coffee directory.'] = function (test) {
    var destDir = testResource.resolveWorkFile('work_coffee_dir');
    testResource.prepareCleanWorkDir(destDir, function () {
        compileCoffeeDirectory({
            srcDir: testResource.resolveMockFile('.'),
            pattern: '**/*.coffee',
            destDir: destDir
        }, function (err) {
            test.ifError(err);
            test.done();
        });
    });
};