<commit_before>'use strict';

var conjoiners = require('../lib/conjoiners');

exports['simple inter-process communication'] = function(test) {
    test.expect(3);

    var value = 'test_value';
    var cj1 = {};
    var cj1Name = 'test';
    var cj2 = {
        onTransenlightenment: function (event) {
            test.equal(event.property, 'val');
            test.equal(this[event.property], value);
        }
    };

    conjoiners.implant(cj1, 'test/conf.json', cj1Name).then(function() {
        return conjoiners.implant(cj2, 'test/conf.json', 'test2');
    }).then(function () {
        cj1.val = value;

        setTimeout(function() {
            test.equal(cj2.val, value);
            test.done();
        }, 1500);
    }).done();
};
<commit_msg>Test should not rely on setTimeout<commit_after>'use strict';

var conjoiners = require('../lib/conjoiners');

exports['simple inter-process communication'] = function(test) {
    test.expect(3);

    var value = 'test_value';
    var cj1 = {};
    var cj1Name = 'test';
    var cj2 = {
        onTransenlightenment: function (event) {
            test.equal(event.property, 'val');
            test.equal(this[event.property], value);
            test.equal(cj2.val, value);
            test.done();
        }
    };

    conjoiners.implant(cj1, 'test/conf.json', cj1Name).then(function() {
        return conjoiners.implant(cj2, 'test/conf.json', 'test2');
    }).then(function () {
        cj1.val = value;
    }).done();
};

{'fraction_non_alphanumeric': 0.16689098250336473, 'fraction_numerical': 0.016150740242261104, 'mean_word_length': 2.4662004662004664, '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': '1631357', 'n_tokens_mistral': 499, 'n_tokens_neox': 479, 'n_words': 89}