text: // Karma configuration file, see link for more information
  // https://karma-runner.github.io/0.13/config/configuration-file.html
  
  module.exports = function(config) {
    config.set({
      basePath: '',
      frameworks: ['jasmine', '@angular/cli'],
      plugins: [
        require('karma-jasmine'),
        require('karma-phantomjs-launcher'),
        require('karma-junit-reporter'),
        require('karma-coverage-istanbul-reporter'),
        require('@angular/cli/plugins/karma')
      ],
      client: {
        clearContext: false // leave Jasmine Spec Runner output visible in browser
      },
      // List of files/patterns to load in the browser
      files: [
        { pattern: './src/test.ts', watched: false }
      ],
      preprocessors: {
        './src/test.ts': ['@angular/cli']
      },
      mime: {
        'text/x-typescript': ['ts', 'tsx']
      },
      junitReporter: {
        outputDir: 'reports/junit/',
        outputFile: 'TESTS-xunit.xml',
        useBrowserName: false,
        suite: '' // Will become the package name attribute in xml testsuite element
      },
      coverageIstanbulReporter: {
        reports: ['html', 'lcovonly', 'text-summary'],
        dir: './reports/coverage',
        fixWebpackSourcePaths: true
      },
      angularCli: {
        config: './.angular-cli.json',
        environment: 'dev'
      },
      reporters: config.angularCli && config.angularCli.codeCoverage
        ? ['progress', 'junit', 'coverage-istanbul']
        : ['progress', 'junit'],
      port: 9876,
      colors: true,
      // Level of logging, can be: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
      logLevel: config.LOG_INFO,
      autoWatch: true,
      browsers: ['PhantomJS'],
      singleRun: false
    });
  };
  