<commit_before>var path = require('path'),
    moment = require('moment');

var api,
    config,
    logger;

var testFile = {
    name: 'JSUtil',
    suffix: 'js',
    folder: 'script_includes',
    table: 'sys_script_include'
}

function runTests(apiObj, configObj) {
    api = apiObj;
    config = configObj;
    logger = configObj._logger;
    var testQueue = [];
    testQueue.push(testDownload);
    testQueue.push(testUpdateRecord);
    testQueue.push(testSyncConflict);

    var nextTest;

    function testDone(passed) {
        if (passed) {
            nextTest = testQueue.shift();
            if (nextTest) {
                nextTest(testDone);
            } else {
                logger.test("Testing Complete.".green);
                process.exit(1);
            }
        } else {
            logger.test("TESTS FAILED. Stopping tests.");
            process.exit(1);
        }
    }

    logger.test(('Running ' + testQueue.length + ' test(s).').bold);
    logger.test('Test file in use:', testFile);

    // start tests
    nextTest = testQueue.shift();
    nextTest(testDone);
}

function getTestFilePath() {
    // this should be an out of the box file available on Dublin, Eureka, Fuji...
    var testFilePath = path.join(getRoot(), testFile.folder, testFile.name + '.' + testFile.suffix);
    return testFilePath;
}<commit_msg>document future tests. fix jshint warning.<commit_after>var path = require('path'),
    moment = require('moment');

var api,
    config,
    logger;

var testFile = {
    name: 'JSUtil',
    suffix: 'js',
    folder: 'script_includes',
    table: 'sys_script_include'
};

function runTests(apiObj, configObj) {
    api = apiObj;
    config = configObj;
    logger = configObj._logger;
    var testQueue = [],
        nextTest;

    testQueue.push(testDownload);
    testQueue.push(testUpdateRecord);
    testQueue.push(testSyncConflict);

    // missing tests
    //testQueue.push(testFolderSetup);
    //testQueue.push(testExportConfig);
    //testQueue.push(testUpgradeNeeded);

    function testDone(passed) {
        if (passed) {
            nextTest = testQueue.shift();
            if (nextTest) {
                nextTest(testDone);
            } else {
                logger.test("Testing Complete.".green);
                process.exit(1);
            }
        } else {
            logger.test("TESTS FAILED. Stopping tests.");
            process.exit(1);
        }
    }

    logger.test(('Running ' + testQueue.length + ' test(s).').bold);
    logger.test('Test file in use: %j', testFile);

    // start tests
    nextTest = testQueue.shift();
    nextTest(testDone);
}

function getTestFilePath() {
    // this should be an out of the box file available on Dublin, Eureka, Fuji...
    var testFilePath = path.join(getRoot(), testFile.folder, testFile.name + '.' + testFile.suffix);
    return testFilePath;
}
{'fraction_non_alphanumeric': 0.13138686131386862, 'fraction_numerical': 0.0013903371567605145, 'mean_word_length': 2.3310185185185186, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6911486', 'n_tokens_mistral': 872, 'n_tokens_neox': 849, 'n_words': 192}