<commit_before>(function(global, undefined) {

    var MODULE_NAME = 'jasmine-async-sugar';
    var JASMINE_FUNCTIONS = ['it', 'fit', 'xit', 'beforeEach', 'afterEach', 'beforeAll', 'afterAll'];
    var ASYNC_SUFIX = 'Async';

    JASMINE_FUNCTIONS.forEach(function(jasmineFunctionName) {

        if (!global[jasmineFunctionName]) {
            console.error(MODULE_NAME, 'Jasmine function: ' + jasmineFunctionName + ' not present in environment');
        }
        var jasmineFunctionNameAsync = jasmineFunctionName + ASYNC_SUFIX;

        // register async methods into global context (window)
        global[jasmineFunctionNameAsync] = function() {
            var args = Array.prototype.slice.call(arguments);
            var testFunction, testDescription;
            if (args.length === 1) {
                testFunction = args[0]
            } else {
                testDescription = args[0];
                testFunction = args[1];
            }
            return runAsync(global[jasmineFunctionName], testFunction, testDescription);
        }
    });

    function runAsync(jasmineFunction, testFunction, desc) {

        if (desc){<commit_msg>return after unknown jasmine function<commit_after>(function(global, undefined) {

    var MODULE_NAME = 'jasmine-async-sugar';
    var JASMINE_FUNCTIONS = ['it', 'fit', 'xit', 'beforeEach', 'afterEach', 'beforeAll', 'afterAll'];
    var ASYNC_SUFIX = 'Async';

    JASMINE_FUNCTIONS.forEach(function(jasmineFunctionName) {

        if (!global[jasmineFunctionName]) {
            console.error(MODULE_NAME, 'Jasmine function: ' + jasmineFunctionName + ' not present in environment');
            return;
        }
        var jasmineFunctionNameAsync = jasmineFunctionName + ASYNC_SUFIX;

        // register async methods into global context (window)
        global[jasmineFunctionNameAsync] = function() {
            var args = Array.prototype.slice.call(arguments);
            var testFunction, testDescription;
            if (args.length === 1) {
                testFunction = args[0]
            } else {
                testDescription = args[0];
                testFunction = args[1];
            }
            return runAsync(global[jasmineFunctionName], testFunction, testDescription);
        }
    });

    function runAsync(jasmineFunction, testFunction, desc) {

        if (desc){
{'fraction_non_alphanumeric': 0.10908319185059423, 'fraction_numerical': 0.003395585738539898, 'mean_word_length': 2.5604229607250755, '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': '4516243', 'n_tokens_mistral': 661, 'n_tokens_neox': 621, 'n_words': 138}