/** @overview nodeunit test case. */

var fs = require('fs'),
    testResource = require('../../../test_resource'),
    generateDataJson = require('../../../../ci/worker/generate_data_json.js');

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

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


exports['Generate data json.'] = function (test) {
    var dest = testResource.resolveWorkFile('work_generate_data_json.json');
    generateDataJson({
        dest: dest,
        data: {
            foo: 'bar'
        }
    }, function (err) {
        test.ifError(err);
        test.equal(require(dest).foo, 'bar');
        test.done();
    });
};