/** @overview nodeunit test case. */

var fs = require('fs'),
    testResource = require('../../../test_resource'),
    compileJadeFile = require('../../../../lib/compile/compile_jade_file.js');

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

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

exports['Compile a jade file.'] = function (test) {
    var src = testResource.resolveMockFile('mock-jade.jade'),
        dest = testResource.resolveWorkFile('work-jade.html');
    compileJadeFile(
        src,
        dest,
        {},
        function (err) {
            test.ifError(err);
            fs.exists(dest, function (exists) {
                test.ok(exists);
                test.done();
            });
        }
    );
};