fix(ci): Shard tests on CI across 3 browsers (#11048)

This commit is contained in:
Joey Perrott
2018-04-27 15:10:57 -07:00
committed by Andrew Seguin
parent b67813ef83
commit a6475792b8
3 changed files with 3333 additions and 3320 deletions
+3327 -3317
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -104,6 +104,7 @@
"karma-firefox-launcher": "^1.0.1",
"karma-jasmine": "^1.1.0",
"karma-sauce-launcher": "^1.2.0",
"karma-sharding": "^4.4.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "^0.0.32",
"madge": "^2.2.0",
+5 -3
View File
@@ -5,7 +5,7 @@ module.exports = (config) => {
config.set({
basePath: path.join(__dirname, '..'),
frameworks: ['jasmine'],
frameworks: ['sharding', 'jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-browserstack-launcher'),
@@ -14,7 +14,8 @@ module.exports = (config) => {
require('karma-firefox-launcher'),
require('karma-sourcemap-loader'),
require('karma-coverage'),
require('karma-spec-reporter')
require('karma-spec-reporter'),
require('karma-sharding'),
],
files: [
{pattern: 'node_modules/core-js/client/core.js', included: true, watched: false},
@@ -134,6 +135,7 @@ module.exports = (config) => {
throw new Error(`Platform "${platform}" unknown, but Travis specified. Exiting.`);
}
config.browsers = platformMap[platform][target.toLowerCase()];
// Set the browser list to be the same browser 3 times, to shard tests into three instances.
config.browsers = (new Array(3)).fill(platformMap[platform][target.toLowerCase()][0]);
}
};