<commit_before>webpack = require('webpack')

module.exports = (config) ->
  config.set
    basePath: '../'
    frameworks: ['mocha', 'chai', 'chai-sinon']
    browsers: ['PhantomJS']
    reporters: ['mocha', 'coverage']

    files: [
      'test/all-tests.coffee'
    ]

    preprocessors:
      'src/**/*.cjsx': ['webpack', 'coverage']
      'test/*':  ['webpack', 'coverage']

    coverageReporter:
      type: 'text'
      # type: 'html' # will create html report in ./coverage directory



    webpack:
      resolve:
        extensions: ['', '.js', '.json', '.coffee', '.cjsx']
      module:
        loaders: [
          { test: /\.coffee$/, loader: "coffee-loader"     }
          { test: /\.json$/,   loader: "json-loader"       }
          { test: /\.cjsx$/,   loader: "coffee-jsx-loader" }
        ]

      postLoaders: [
        {
          test: /\.(cjsx|coffee)$/
          loader: 'istanbul-instrumenter'
          exclude: /(node_modules|resources|bower_components)/
        }
      ]

    webpackMiddleware:
      stats:
        colors: true

    logLevel: config.LOG_DEBUG

    plugins:[
      require("karma-coverage")
      require("karma-mocha")
      require("karma-webpack")
      require("karma-mocha-reporter")
      require("karma-phantomjs-launcher")
      require("karma-chai")
      require("karma-chai-sinon")
    ]
<commit_msg>Add phantomjs shim<commit_after>webpack = require('webpack')

module.exports = (config) ->
  config.set
    basePath: '../'
    frameworks: ['mocha', 'chai', 'chai-sinon', 'phantomjs-shim']
    browsers: ['PhantomJS']
    reporters: ['mocha', 'coverage']

    files: [
      'test/all-tests.coffee'
      'src/all.coffee'
    ]

    preprocessors:
      'src/**/*.{coffee,cjsx}': ['webpack', 'coverage']
      'test/*':  ['webpack', 'coverage']

    coverageReporter:
      type: 'text'
      # type: 'html' # will create html report in ./coverage directory

    webpack:
      resolve:
        extensions: ['', '.js', '.json', '.coffee', '.cjsx']
      module:
        loaders: [
          { test: /\.coffee$/, loader: "coffee-loader"     }
          { test: /\.json$/,   loader: "json-loader"       }
          { test: /\.cjsx$/,   loader: "coffee-jsx-loader" }
        ]

      postLoaders: [
        {
          test: /\.(cjsx|coffee)$/
          loader: 'istanbul-instrumenter'
          exclude: /(node_modules|resources|bower_components)/
        }
      ]

    webpackMiddleware:
      stats:
        colors: false

    #logLevel: config.LOG_DEBUG

    plugins:[
      require("karma-phantomjs-shim")
      require("karma-coverage")
      require("karma-mocha")
      require("karma-webpack")
      require("karma-mocha-reporter")
      require("karma-phantomjs-launcher")
      require("karma-chai")
      require("karma-chai-sinon")
    ]

{'fraction_non_alphanumeric': 0.17183600713012478, 'fraction_numerical': 0.0, 'mean_word_length': 2.086908690869087, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '780484', 'n_tokens_mistral': 993, 'n_tokens_neox': 936, 'n_words': 161}