// browserstack (read: IE11) config const karma = require('./karma.common.js') const appComponents = require('./app_components.js') const browserStackLauncher = { ie11: { 'base': 'BrowserStack', 'browser': 'ie', 'browser_version': '11.0', 'os': 'Windows', // Pick OS from the env variable or use Windows 7 'os_version': process.env.OS || '7', 'name': appComponents.id } } const options = { preprocessors: { [appComponents.all[appComponents.id]]: ['webpack', 'gzip'], }, // Browsers configuration browsers: [Object.keys(browserStackLauncher)], customLaunchers: browserStackLauncher, browserStack: { // Increase polling time to avoid hitting BS rate limit, default is 1000 pollingTimeout: 5 * 1000, /* 5 seconds */ // https://github.com/karma-runner/karma-browserstack-launcher/issues/17#issuecomment-181559755 startTunnel: true, // if tests ain't completed during this timespan IE is stalled timeout: 4 * 60, /* 4 minutes */ name: process.env.BUILD_TAG || false, project: 'Platform' }, // We are limited in the number of parallel VMs in BrowserStack (5) // and Karma don't know how to limit parallel browser instances // so waiting time must be insanely high. Default is 10 * 1000 browserNoActivityTimeout: 3 * 60 * 1000, /* 3 minutes */ captureTimeout: 90 * 1000, /* 1.5 minutes */ // Make Karma more tolerant to disconnects. It's required to make // BrowserStack tests more stable. Default is 2000. browserDisconnectTimeout: 30 * 1000, /* 30 sec */ browserDisconnectTolerance: 5, // Reporters configuration reporters: ['mocha', 'BrowserStack'], mochaReporter: { output: 'minimal' } } module.exports = function (config) { karma(config, options) }