var fs = require('fs'),
    testResource = require('../../../test_resource'),
    generateHtmlFromMarkdown = require('../../../../task/worker/generate_html_from_markdown');

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


exports['Generate a html from markdown'] = function (test) {
    var src = testResource.resolveMockFile('mock-markdown.md'),
        dest = testResource.resolveWorkFile('work-markdown-generated.html');
    generateHtmlFromMarkdown({
        src: src,
        dest: dest
    }, function (err) {
        test.ifError(err);
        test.done();
    });
};