<commit_before>
var clojjs = require('..');
var path = require('path');

exports['Load simple project'] = function (test) {
    if (typeof myapp != 'undefined')
        delete myapp;
        
    clojjs.loadConfiguration(path.join(__dirname, 'projects', 'simple', 'clojjs.json'));
    clojjs.requireNamespace('myapp.core', {});
    test.ok(myapp);
    test.ok(myapp.core);
    test.ok(myapp.core.answer);
    test.equal(myapp.core.answer, 42);
}

exports['Execute require and load simple project'] = function (test) {
    if (typeof myapp != 'undefined')
        delete myapp;
        
    clojjs.loadConfiguration(path.join(__dirname, 'projects', 'simple', 'clojjs.json'));
    clojjs.execute("(require 'myapp.core true)", {});
    test.ok(myapp);
    test.ok(myapp.core);
    test.ok(myapp.core.answer);
    test.equal(myapp.core.answer, 42);
}<commit_msg>Project test minor refactor<commit_after>
const clojjs = require('..');
const path = require('path');

exports['Load simple project'] = function (test) {
    if (typeof myapp != 'undefined')
        delete myapp;
        
    clojjs.loadConfiguration(path.join(__dirname, 'projects', 'simple', 'clojjs.json'));
    clojjs.requireNamespace('myapp.core', {});
    test.ok(myapp);
    test.ok(myapp.core);
    test.ok(myapp.core.answer);
    test.equal(myapp.core.answer, 42);
}

exports['Execute require and load simple project'] = function (test) {
    if (typeof myapp != 'undefined')
        delete myapp;
        
    clojjs.loadConfiguration(path.join(__dirname, 'projects', 'simple', 'clojjs.json'));
    clojjs.execute("(require 'myapp.core true)", {});
    test.ok(myapp);
    test.ok(myapp.core);
    test.ok(myapp.core.answer);
    test.equal(myapp.core.answer, 42);
}

{'fraction_non_alphanumeric': 0.1729106628242075, 'fraction_numerical': 0.004610951008645533, 'mean_word_length': 3.5804749340369395, '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': '6225143', 'n_tokens_mistral': 586, 'n_tokens_neox': 576, 'n_words': 111}