<commit_before>// Use Karma to generate code coverage.
// https://github.com/karma-runner/karma-coverage
var path = require('path');

module.exports = function(config) {
	config.set({
		// src and test files
		'files': [
			// '../src/*.js',
			// '../src/**/*.js',
			'../test/units/specs/*.js',
			'../test/units/specs/**/*.js'
		],

		'frameworks': ['jasmine'],

		// coverage reporter generates the coverage
		'reporters': ['progress', 'coverage'],

		'preprocessors': {
			// source files, that you wanna generate coverage for
			// do not include tests or libraries
			// (these files will be instrumented by Istanbul)
			'../src/*.js': ['webpack', 'sourcemap', 'coverage'],
			'../src/**/*.js': ['webpack', 'sourcemap', 'coverage'],
			'../test/units/specs/*.js': ['webpack', 'sourcemap'],
			'../test/units/specs/**/*.js': ['webpack', 'sourcemap'],
		},

		// optionally, configure the reporter
		'coverageReporter': {
			'dir': '../coverage/',
			'reporters': [
				{'type': 'lcov', 'subdir': '.' },
				{'type': 'text-summary', 'subdir': '.' }
			]
		},

		'webpack': {
			'devtool': 'inline-source-map',
			'resolve': {
				'alias': {
					'src': path.resolve(__dirname, '../src'),
					'mvvm': path.resolve(__dirname, '../src/mvvm/index')
				}
			},
			'module': {
				'preLoaders': [{
					'test': /\.js$/,
					'exclude': [/node_modules/,/\.Spec.js$/],
					'loader': 'istanbul-instrumenter-loader'
				}]
			}
		},

		'webpackServer': {
			'noInfo': true // prevent console spamming when running in Karma!
		},

		// 'plugins': [
		// 	'karma-jasmine',
		// 	'karma-chrome-launcher',
		// 	'karma-webpack',
		// 	'karma-sourcemap-loader',
		// 	'karma-coverage'
		// ],

		// 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,

		// Continuous Integration mode
		// if true, Karma captures browsers, runs the tests and exits
		'singleRun': true
	});
}<commit_msg>Add karma code coveage config.<commit_after>// Use Karma to generate test code coverage.
// https://github.com/karma-runner/karma-coverage
var path = require('path');

module.exports = function(config) {
	config.set({
		// base path, that will be used to resolve files and exclude
		'basePath': '',

		// frameworks to use
		'frameworks': ['jasmine'],

		// start these browsers
		'browsers': ['Chrome'],

		// list of files to load in the browser
		'files': [
			'../test/units/index.js'
		],

		// list of preprocessors
		'preprocessors': {
			'../test/units/index.js': ['webpack']
		},

		// test results reporter to use
		// possible values: 'spec', 'dots', 'progress', 'junit', 'growl', 'coverage'
		'reporters': ['progress', 'coverage'],

		// set coverage report type and generate path
		'coverageReporter': {
			'dir': '../test/coverage/',
			'reporters': [
				{'type': 'lcov', 'subdir': '.'},
				{'type': 'text-summary', 'subdir': '.'}
			]
		},

		// Continuous Integration mode
		// if true, it capture browsers, run tests and exit
		'singleRun': true,

		// webpack middleware config
		'webpackMiddleware': {
			'noInfo': true
		},

		// webpack config
		'webpack': {
			'devtool': 'inline-source-map',
			'resolve': {
				'alias': {
					'src': path.resolve(__dirname, '../src'),
					'mvvm': path.resolve(__dirname, '../src/mvvm/index')
				}
			},
			'module': {
				// coverage post loader
				'postLoaders': [
					{
						'test': /\.js$/,
						'exclude': /test|node_modules/,
						'loader': 'istanbul-instrumenter'
					}
				]
			}
		}
	});
}
{'fraction_non_alphanumeric': 0.20250800426894344, 'fraction_numerical': 0.0, 'mean_word_length': 2.749, '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': '3366614', 'n_tokens_mistral': 1509, 'n_tokens_neox': 1248, 'n_words': 304}