<commit_before>'use strict';

(function (window) {
    var DEFAULT_TAG_PREFIX = '#';

    var karma = window.__karma__;
    var jasmineEnv = jasmine.getEnv();

    var tagPrefix = karma.config.tagPrefix || DEFAULT_TAG_PREFIX;
    var tags = parseTags(karma.config.tags);
    var skipTags = parseTags(karma.config.skipTags);

    // skipTags must not contain tags values.
    if (Array.isArray(tags) && Array.isArray(skipTags)) {
        skipTags = skipTags.filter(function (tag) {
            return tags.indexOf(tag) === -1;
        });
    }

    var specFilterFnDelegate = jasmineEnv.configuration.specFilter;
    jasmineEnv.configure({ specFilter: customSpecFilter });

    function parseTags(tags) {
        tags = tags || [];
        if (tags) {
            if (!Array.isArray(tags)) {
                if (typeof tags === 'string') {
                    tags = tags.split(',')
                } else if (tags === true) {
                    // Enables "any tag" mode.
                    return true;
                } else {
                    tags = [];
                }
            }
            tags = tags.map(function (tag) {<commit_msg>Fix specFilterFnDelegate bug where configuration not being called<commit_after>'use strict';

(function (window) {
    var DEFAULT_TAG_PREFIX = '#';

    var karma = window.__karma__;
    var jasmineEnv = jasmine.getEnv();

    var tagPrefix = karma.config.tagPrefix || DEFAULT_TAG_PREFIX;
    var tags = parseTags(karma.config.tags);
    var skipTags = parseTags(karma.config.skipTags);

    // skipTags must not contain tags values.
    if (Array.isArray(tags) && Array.isArray(skipTags)) {
        skipTags = skipTags.filter(function (tag) {
            return tags.indexOf(tag) === -1;
        });
    }

    var specFilterFnDelegate = jasmineEnv.configuration().specFilter;
    jasmineEnv.configure({ specFilter: customSpecFilter });

    function parseTags(tags) {
        tags = tags || [];
        if (tags) {
            if (!Array.isArray(tags)) {
                if (typeof tags === 'string') {
                    tags = tags.split(',')
                } else if (tags === true) {
                    // Enables "any tag" mode.
                    return true;
                } else {
                    tags = [];
                }
            }
            tags = tags.map(function (tag) {
{'fraction_non_alphanumeric': 0.12393887945670629, 'fraction_numerical': 0.0008488964346349745, 'mean_word_length': 1.819377990430622, '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': '4841541', 'n_tokens_mistral': 673, 'n_tokens_neox': 644, 'n_words': 151}