{"size": 3538, "ext": "js", "max_stars_repo_path": "karma.conf.js", "max_stars_repo_name": "zigasinko/resolwe-js", "max_stars_repo_stars_event_min_datetime": "2017-01-16T07:09:34.000Z", "max_stars_repo_stars_event_max_datetime": "2017-11-10T02:20:40.000Z", "max_issues_repo_path": "karma.conf.js", "max_issues_repo_name": "zigasinko/resolwe-js", "max_issues_repo_issues_event_min_datetime": "2017-02-09T07:31:49.000Z", "max_issues_repo_issues_event_max_datetime": "2020-08-31T08:37:43.000Z", "max_forks_repo_path": "karma.conf.js", "max_forks_repo_name": "zigasinko/resolwe-js", "max_forks_repo_forks_event_min_datetime": "2017-01-18T12:08:43.000Z", "max_forks_repo_forks_event_max_datetime": "2021-03-03T09:27:47.000Z"}
{"max_stars_count": 4, "max_issues_count": 25, "max_forks_count": 9, "avg_line_length": 29.2396694215, "max_line_length": 124, "alphanum_fraction": 0.5689655172}
const path = require('path');
const gulpfile = require('./gulpfile');

const buildDir = path.basename(gulpfile.config.buildDir);
const srcDir = path.basename(gulpfile.config.srcDir);

const preprocessors = {};
preprocessors[path.join(buildDir, '!(*spec).js')] = ['coverage'];

module.exports = function(config) {
    config.set({

        // base path that will be used to resolve all patterns (eg. files, exclude)
        basePath: './',


        // frameworks to use
        // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
        frameworks: ['systemjs', 'jasmine'],


        // list of files / patterns to load in the browser
        files: [
            // Ensure that test initialization is loaded first.
            path.join(buildDir, 'tests', 'initialization.js'),
            // After initialization, load all the test files.
            path.join(buildDir, '**', '*.spec.js'),
        ],


        proxies: {
        },


        // list of files to exclude
        exclude: [
        ],


        // SystemJS.
        systemjs: {
            configFile: 'system.conf.js',
            serveFiles: [
                path.join(buildDir, '**', '!(*.spec).js'),
                path.join('node_modules', '**', '*.js')
            ],
        },


        // preprocess matching files before serving them to the browser
        // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
        preprocessors: preprocessors,


        // test results reporter to use
        // possible values: 'dots', 'progress'
        // available reporters: https://npmjs.org/browse/keyword/karma-reporter
        reporters: ['progress', 'coverage', 'junit'],


        // web server port
        port: 9876,


        // enable / disable colors in the output (reporters and logs)
        colors: true,


        // level of logging
        // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
        logLevel: config.LOG_INFO,


        // enable / disable watching file and executing tests whenever any file changes
        autoWatch: false,


        // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
        customLaunchers: {
            ChromeHeadlessNoSandbox: {
                base: 'ChromeHeadless',
                flags: ['--no-sandbox'],
                displayName: 'Chrome Headless (no sandbox)'
            },
            ChromiumHeadlessNoSandbox: {
                base: 'ChromiumHeadless',
                flags: ['--no-sandbox'],
                displayName: 'Chromium Headless (no sandbox)'
            }
        },

        // start these browsers
        // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
        browsers: ['ChromeHeadless'],
        browserNoActivityTimeout: 30000,


        // Continuous Integration mode
        // if true, Karma captures browsers, runs the tests and exits
        // This is set in gulp task
        // singleRun: false,

        // Concurrency level
        // how many browser should be started simultaneous
        concurrency: Infinity,

        coverageReporter: {
            dir : gulpfile.config.coverageDirRel,
            reporters: [
                { type: 'json', subdir: 'json' }
            ]
        },

        junitReporter: {
            outputDir: path.join(gulpfile.config.reportsDirRel, 'junit'),
            outputFile: 'report.xml',
            useBrowserName: false
        }
    })
};
