<commit_before>

module.exports = function(config) {

    var settings = {
        basePath: '',
        frameworks: ['mocha', 'browserify', 'es5-shim', 'sinon'],
        files: [
            'test/lib/Function-polyfill.js'
        ],
        exclude: [],
        colors: true,
        logLevel: config.LOG_WARN,
        autoWatch: true,
        captureTimeout: 60000,
        singleRun: false,
        browserify: {
            watch: true,
            debug: true,
            files: [
                'lib/**/*.js',
                'test/**/*.js'
            ]
        },
        preprocessors: {
            '/**/*.browserify': 'browserify'
        },
        plugins: ['karma-*'],
    };

    if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
        settings.reporters = ['progress'];
        settings.browsers = ['PhantomJS'];
    } else {
        settings.browserDisconnectTimeout = 60000;
        settings.browserNoActivityTimeout = 60000;
        settings.captureTimeout = 60000 * 3;
        settings.sauceLabs = {
            testName: 'Gardr host',
            tags: ['gardr', 'host']
        };
        settings.reporters = ['dots', 'saucelabs'];
        settings.customLaunchers = {};

        // only 3 vmms / browsers per run because of
        // https://github.com/karma-runner/karma-sauce-launcher/issues/40
        // should either add better setup for running max currently or
        var key = process.env.BROWSER_TYPE;
        var target = require('./ci-browsers.js')[key];
        if (!target) {
            console.error('Missing / Unknown BROWSER_TYPE ' + process.env.BROWSER_TYPE);
            process.exit(1);
        }

        Object.keys(target).forEach(function(key){
            settings.customLaunchers[key] = target[key];
        });

        console.log('Running CI tests on', Object.keys(settings.customLaunchers).join(', '));
        settings.browsers = Object.keys(settings.customLaunchers);
    }

    return config.set(settings);
};
<commit_msg>cleanup karmaconfig<commit_after>module.exports = function(config) {
    var settings = {
        basePath: '',
        frameworks: ['mocha', 'browserify', 'es5-shim', 'sinon'],
        files: [
            'test/lib/Function-polyfill.js'
        ],
        reporters: ['progress'],
        browsers: ['PhantomJS'],
        exclude: [],
        colors: true,
        logLevel: config.LOG_WARN,
        autoWatch: true,
        captureTimeout: 60000,
        singleRun: false,
        browserify: {
            watch: true,
            debug: true,
            files: [
                'lib/**/*.js',
                'test/**/*.js'
            ]
        },
        preprocessors: {
            '/**/*.browserify': 'browserify'
        },
        plugins: ['karma-*'],
    };

    if (process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY) {
        settings.browserDisconnectTimeout = 60000;
        settings.browserNoActivityTimeout = 60000;
        settings.captureTimeout = 60000 * 3;
        settings.sauceLabs = {
            testName: 'Gardr host',
            tags: ['gardr', 'host']
        };
        settings.reporters = ['dots', 'saucelabs'];
        settings.customLaunchers = {};

        // only 3 vmms / browsers per run because of
        // https://github.com/karma-runner/karma-sauce-launcher/issues/40
        // should either add better setup for running max currently or
        var key = process.env.BROWSER_TYPE;
        var target = require('./ci-browsers.js')[key];
        if (!target) {
            console.error('Missing / Unknown BROWSER_TYPE ' + process.env.BROWSER_TYPE);
            process.exit(1);
        }

        Object.keys(target).forEach(function(key){
            settings.customLaunchers[key] = target[key];
        });

        console.log('Running CI tests on', Object.keys(settings.customLaunchers).join(', '));
        settings.browsers = Object.keys(settings.customLaunchers);
    }

    return config.set(settings);
};

{'fraction_non_alphanumeric': 0.13883299798792756, 'fraction_numerical': 0.013078470824949699, 'mean_word_length': 1.8735549132947977, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6148078', 'n_tokens_mistral': 1225, 'n_tokens_neox': 1156, 'n_words': 213}