<commit_before>'use strict';

const path = require('path');

let config;

const local = typeof process.env.CI === 'undefined' || process.env.CI === 'false';
const port = 9001;

if ( local ) {
	config = {
		browsers: ['Chrome'],
	};
} else {
	config = {
		browserStack: {
			startTunnel: true,
			project: 'figura',
			name: 'Automated (Karma)',
			build: 'Automated (Karma)'
		},
		customLaunchers: {
			'BS-Chrome': {
				base: 'BrowserStack',
				browser: 'Chrome',
				os: 'Windows',
				'os_version': '7',
				project: 'figura',
				build: 'Automated (Karma)',
				name: 'Chrome'
			},
			'BS-Firefox': {
				base: 'BrowserStack',
				browser: 'Firefox',
				os: 'Windows',
				'os_version': '7',
				project: 'figura',
				build: 'Automated (Karma)',
				name: 'Firefox'
			},
			'BS-IE9': {
				base: 'BrowserStack',
				browser: 'IE',
				'browser_version': '9',
				os: 'Windows',
				'os_version': '7',
				project: 'figura',
				build: 'Automated (Karma)',
				name: 'IE9'
			},
			// 'BS-iOS 8.3': {
			// 	base: 'BrowserStack',
			// 	device: 'iPhone 6',
			// 	browser: 'Mobile Safari',
			// 	'browser_version': null,
			// 	os: 'ios',
			// 	'os_version': '8.3',
			// 	project: 'kist-view',
			// 	build: 'Automated (Karma)',
			// 	name: 'iOS'
			// },
			// 'BS-Android 4.2': {
			// 	base: 'BrowserStack',
			// 	device: 'Google Nexus 4',
			// 	browser: 'Android Browser',
			// 	'browser_version': null,
			// 	os: 'android',
			// 	'os_version': '4.2',
			// 	project: 'kist-view',
			// 	build: 'Automated (Karma)',
			// 	name: 'Android'
			// }
		},
		browsers: ['BS-Chrome', 'BS-Firefox', 'BS-IE9']
	};
}

module.exports = function ( baseConfig ) {

	baseConfig.set(Object.assign({
		basePath: '',
		frameworks: ['mocha', 'fixture'],
		files: [
			'test/**/*.html',
			'test/**/.webpack.js'
		],
		exclude: [],
		preprocessors: {
			'test/**/*.html': ['html2js'],
			'test/**/.webpack.js': ['webpack', 'sourcemap']
		},
		reporters: ['mocha', 'coverage-istanbul'],
		port: port,
		colors: true,
		logLevel: baseConfig.LOG_INFO,
		autoWatch: false,
		client: {
			captureConsole: true
		},
		browserConsoleLogOptions: {
			level: 'log',
			format: '%b %T: %m',
			terminal: true<commit_msg>Adjust Karma configuration for iOS testing<commit_after>'use strict';

const path = require('path');

let config;

const local = typeof process.env.CI === 'undefined' || process.env.CI === 'false';
const port = 9001;

if ( local ) {
	config = {
		browsers: ['Chrome'],
	};
} else {
	config = {
		hostname: 'bs-local.com',
		browserStack: {
			startTunnel: true,
			project: 'figura',
			name: 'Automated (Karma)',
			build: 'Automated (Karma)'
		},
		customLaunchers: {
			'BS-Chrome': {
				base: 'BrowserStack',
				browser: 'Chrome',
				os: 'Windows',
				'os_version': '7',
				project: 'figura',
				build: 'Automated (Karma)',
				name: 'Chrome'
			},
			'BS-Firefox': {
				base: 'BrowserStack',
				browser: 'Firefox',
				os: 'Windows',
				'os_version': '7',
				project: 'figura',
				build: 'Automated (Karma)',
				name: 'Firefox'
			},
			'BS-IE9': {
				base: 'BrowserStack',
				browser: 'IE',
				'browser_version': '9',
				os: 'Windows',
				'os_version': '7',
				project: 'figura',
				build: 'Automated (Karma)',
				name: 'IE9'
			},
			'BS-iOS 10.0': {
				base: 'BrowserStack',
				device: 'iPhone 7 Plus',
				browser: 'Mobile Safari',
				'browser_version': null,
				'real_mobile': true,
				'os': 'ios',
				'os_version': '10.0',
				project: 'figura',
				build: 'Automated (Karma)',
				name: 'iOS'
			},
			'BS-Android 4.4': {
				base: 'BrowserStack',
				device: 'Google Nexus 5',
				browser: 'Android Browser',
				'browser_version': null,
				'real_mobile': true,
				os: 'android',
				'os_version': '4.4',
				project: 'figura',
				build: 'Automated (Karma)',
				name: 'Android'
			}
		},
		browsers: ['BS-Chrome', 'BS-Firefox', 'BS-IE9', 'BS-iOS 10.0', 'BS-Android 4.4']
	};
}

module.exports = function ( baseConfig ) {

	baseConfig.set(Object.assign({
		basePath: '',
		frameworks: ['mocha', 'fixture'],
		files: [
			'test/**/*.html',
			'test/**/.webpack.js'
		],
		exclude: [],
		preprocessors: {
			'test/**/*.html': ['html2js'],
			'test/**/.webpack.js': ['webpack', 'sourcemap']
		},
		reporters: ['mocha', 'coverage-istanbul'],
		port: port,
		colors: true,
		logLevel: baseConfig.LOG_INFO,
		autoWatch: false,
		client: {
			captureConsole: true
		},
		browserConsoleLogOptions: {
			level: 'log',
			format: '%b %T: %m',
			terminal: true
{'fraction_non_alphanumeric': 0.20590193033059684, 'fraction_numerical': 0.011315731084978922, 'mean_word_length': 2.843137254901961, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2585860', 'n_tokens_mistral': 2125, 'n_tokens_neox': 1708, 'n_words': 371}