/** @overview nodeunit test case. */

var testResource = require('../../../test_resource'),
    precompileJadeDirectory = require('../../../../task/worker/precompile_jade_directory.js');

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

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


exports['Precompile jade directory.'] = function (test) {
    var srcDir = testResource.resolveMockFile('.'),
        workDir = testResource.resolveWorkFile('work_precompile_jade_files');
    testResource.prepareCleanWorkDir(workDir, function () {
        precompileJadeDirectory({
            srcDir: srcDir,
            destDir: workDir,
            pattern: '*.jade'
        }, function (err) {
            test.ifError(err);
            test.done();
        });
    });
};