<commit_before>/*globals alertOK, require, TestSuite*/

// some helpers
function exit() {
    window.open('', '_self', '');
    window.close();
}

function alertForever(msg) {
    alert(msg, 99999);
}

function getURLParam(name) {
    var queryRegex = new RegExp(name + '=([^\\&]+)'),
        match = document.URL.split('?').last().match(queryRegex);
    return match && match[1];
}


// some preparation
var testRunId = getURLParam("testRunId");

if (!testRunId) {
    var msg = 'no id for test run, cannot execute tests';
    alertForever(msg);
    throw msg;
}


// result processing
function postResult(message) {
    alertOK("Result: \n" + message);
    $.post('/test-result', {testRunId: testRunId, testResults: message});
}

// currently only used for interactive testing
function getResult(id) {
    // getResult(1)
    $.post('/test-report', {testRunId: id}, function(data) { alert(JSON.stringify(data)) });
}


// running the actual tests
var testList = [
    "tests.TestFrameworkTests",
    "tests.BaseTest",
    "tests.HelperTest",
    "tests.MiniPrototypeTest",
    "tests.ObjectTests",
    "tests.ModuleSystemTests",
    "tests.OmetaTest",
    "tests.ClassTest",
    "tests.TraitTests",
    "tests.TracingTests",
    "lively.persistence.tests.PersistenceTests",
    "lively.bindings.tests.BindingTests",
    "lively.ast.tests.AstTests",
    "cop.LayersTest",
    // "lively.morphic.Tests",
    // "lively.bindings.GeometryBindingsTest",
];

require(['lively.TestFramework'].concat(testList)).toRun(function() {
    var suite = TestSuite.forAllAvailableTests();
    suite.runFinished = function() {
        var result = suite.result.getJsonResult();
        postResult(result);
        if (!getURLParam('stayOpen')) {
            exit.delay(0.5);
        }
    };
    suite.runAll();
});<commit_msg>consistent naming for tests/ modules<commit_after>/*globals alertOK, require, TestSuite*/

// some helpers
function exit() {
    window.open('', '_self', '');
    window.close();
}

function alertForever(msg) {
    alert(msg, 99999);
}

function getURLParam(name) {
    var queryRegex = new RegExp(name + '=([^\\&]+)'),
        match = document.URL.split('?').last().match(queryRegex);
    return match && match[1];
}


// some preparation
var testRunId = getURLParam("testRunId");

if (!testRunId) {
    var msg = 'no id for test run, cannot execute tests';
    alertForever(msg);
    throw msg;
}


// result processing
function postResult(message) {
    alertOK("Result: \n" + message);
    $.post('/test-result', {testRunId: testRunId, testResults: message});
}

// currently only used for interactive testing
function getResult(id) {
    // getResult(1)
    $.post('/test-report', {testRunId: id}, function(data) { alert(JSON.stringify(data)) });
}


// running the actual tests
var testList = [
    "tests.TestFrameworkTests",
    "tests.BaseTests",
    "tests.HelperTests",
    "tests.MiniPrototypeTests",
    "tests.ObjectTests",
    "tests.ModuleSystemTests",
    "tests.OmetaTests",
    "tests.ClassTests",
    "tests.TraitTests",
    "tests.TracingTests",
    "lively.persistence.tests.PersistenceTests",
    "lively.bindings.tests.BindingTests",
    "lively.ast.tests.AstTests",
    "cop.LayersTest",
    // "lively.morphic.Tests",
    // "lively.bindings.GeometryBindingsTest",
];

require(['lively.TestFramework'].concat(testList)).toRun(function() {
    var suite = TestSuite.forAllAvailableTests();
    suite.runFinished = function() {
        var result = suite.result.getJsonResult();
        postResult(result);
        if (!getURLParam('stayOpen')) {
            exit.delay(0.5);
        }
    };
    suite.runAll();
});
{'fraction_non_alphanumeric': 0.166210295728368, 'fraction_numerical': 0.004928806133625411, 'mean_word_length': 3.4225181598062955, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1317041', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1167, 'n_words': 222}