/**
 * Define test tasks.
 * @module ci.tasks.testTasks
 * @author "ci.worker.generateStructure"
 *
 */
var helpers = require('../helpers'),
    t = helpers.taskDefineHelper;

/**
 * Run ci module unit tests.
 * @name ci.tasks.testCiUnitTests
 * @type {string[]}
 */
exports.testCiUnitTests = t.runNodeunit({
    files: 'test/unit_tests/ci/**/*_test.js'
});

/**
 * Run lib module unit tests.
 * @name ci.tasks.testLibUnitTests
 * @type {string[]}
 */
exports.testLibUnitTests = t.runNodeunit({
    files: 'test/unit_tests/lib/**/*_test.js'
});

/**
 * Run unit tests at unit test root directory.
 * @type {*|Object}
 */
exports.testRootUnitTests = t.runNodeunit({
    files: 'test/unit_tests/*_test.js'
});

/**
 * Run unit tests.
 * @name ci.tasks.testUnitTests
 * @type {string[]}
 */
exports.testUnitTests = [
    'testCiUnitTests',
    'testLibUnitTests',
    'testRootUnitTests'
];

/**
 * Run scenario tests.
 * @name ci.tasks.testScenarioTests
 * @type {string[]}
 */
exports.testScenarioTests = t.runMocha({
    files: [
        'test/scenario_tests/doc_scenario/*.js'
    ],
    timeout: 4000
});

/**
 * Run tests.
 * @name ci.tasks.test
 * @type {object}
 */
exports.test = [
    'testUnitTests',
    'testScenarioTests'
];