<commit_before>INTEGRATION_TEST = {};

var test = require('../_node-files/node_modules/tape'),
    http = require('http'),
    fs = require('fs'),
    exec = require('child_process').exec,
    request = require('../_node-files/node_modules/request'),
    watch = require('../_node-files/watch'),
    basePath = require('../_node-files/modules/utils').basePath;

chai.use(sinonChai);

function globalAssetFileCheckModifiedTime(filePath, command, assertion) {
    var originalFileStats = fs.statSync(basePath + filePath),
        originalFileLastModifiedDate = originalFileStats.mtime.getTime(),
        newFileStats,
        newFileLastModifiedDate;

    setTimeout(function() {
        command();

        setTimeout(function() {
            newFileStats = fs.statSync(basePath + filePath);
            newFileLastModifiedDate = newFileStats.mtime;

            setTimeout(function() {
                assertion(newFileLastModifiedDate.getTime() > originalFileLastModifiedDate);
            }, 500);
        }, 10000);
    }, 200);
}

INTEGRATION_TEST.run = function(PORT) {

    // Mock a fake data into main _data.json file in order to test update later<commit_msg>Removed old dependencies from integration test.<commit_after>INTEGRATION_TEST = {};

var test = require('../_node-files/node_modules/tape'),
    http = require('http'),
    fs = require('fs'),
    exec = require('child_process').exec,
    request = require('../_node-files/node_modules/request'),
    watch = require('../_node-files/watch'),
    basePath = require('../_node-files/modules/utils').basePath;

function globalAssetFileCheckModifiedTime(filePath, command, assertion) {
    var originalFileStats = fs.statSync(basePath + filePath),
        originalFileLastModifiedDate = originalFileStats.mtime.getTime(),
        newFileStats,
        newFileLastModifiedDate;

    setTimeout(function() {
        command();

        setTimeout(function() {
            newFileStats = fs.statSync(basePath + filePath);
            newFileLastModifiedDate = newFileStats.mtime;

            setTimeout(function() {
                assertion(newFileLastModifiedDate.getTime() > originalFileLastModifiedDate);
            }, 500);
        }, 10000);
    }, 200);
}

INTEGRATION_TEST.run = function(PORT) {

    // Mock a fake data into main _data.json file in order to test update later
{'fraction_non_alphanumeric': 0.1257459505541347, 'fraction_numerical': 0.00937766410912191, 'mean_word_length': 3.146643109540636, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7388984', 'n_tokens_mistral': 679, 'n_tokens_neox': 654, 'n_words': 121}