Skip to content

Commit b161058

Browse files
committed
chore(test): update karma configuration for saucelabs environment
1 parent 9996d77 commit b161058

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

karma.conf.js

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
// Generated on Tue Dec 08 2015 23:01:01 GMT-0800 (Pacific Standard Time)
33

44
module.exports = function (config) {
5+
// Check out https://saucelabs.com/platforms for expanding browser coverage
6+
var customLaunchers = {
7+
sl_chrome: {
8+
base: 'SauceLabs',
9+
browserName: 'chrome',
10+
platform: 'Windows 10',
11+
version: '46'
12+
},
13+
sl_firefox: {
14+
base: 'SauceLabs',
15+
browserName: 'firefox',
16+
version: '30'
17+
}
18+
};
19+
520
config.set({
621

722
// base path that will be used to resolve all patterns (eg. files, exclude)
@@ -31,7 +46,7 @@ module.exports = function (config) {
3146
// test results reporter to use
3247
// possible values: 'dots', 'progress'
3348
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
34-
reporters: ['progress'],
49+
reporters: ['dots','saucelabs'],
3550

3651
// web server port
3752
port: 9876,
@@ -48,14 +63,19 @@ module.exports = function (config) {
4863

4964
// start these browsers
5065
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
51-
browsers: ['Chrome'],
66+
customLaunchers: customLaunchers,
67+
browsers: process.env.TRAVIS ? Object.keys(customLaunchers) : ['Chrome'],
5268

5369
// Continuous Integration mode
5470
// if true, Karma captures browsers, runs the tests and exits
5571
singleRun: true,
5672

5773
// Concurrency level
5874
// how many browser should be started simultanous
59-
concurrency: 1
75+
concurrency: 1,
76+
77+
sauceLabs: {
78+
testName: 'RxJS 5 browser test'
79+
}
6080
});
61-
};
81+
};

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"cover": "istanbul cover -x \"*-spec.js index.js *-helper.js spec/helpers/*\" ./node_modules/jasmine/bin/jasmine.js && npm run cover_remapping",
3030
"cover_remapping": "remap-istanbul -i coverage/coverage.json -o coverage/coverage-remapped.json && remap-istanbul -i coverage/coverage.json -o coverage/coverage-remapped.lcov -t lcovonly && remap-istanbul -i coverage/coverage.json -o coverage/coverage-remapped -t html",
3131
"test": "jasmine",
32+
"test_karma": "karma start karma.conf.js",
3233
"tests2png": "mkdirp img && JASMINE_CONFIG_PATH=spec/support/tests2png.json jasmine",
3334
"watch": "watch \"echo triggering build && npm run build_test && echo build completed\" src -d -u -w=15",
3435
"perf": "protractor protractor.conf.js",
@@ -102,6 +103,7 @@
102103
"karma-browserify": "4.4.2",
103104
"karma-chrome-launcher": "0.2.2",
104105
"karma-jasmine": "0.3.6",
106+
"karma-sauce-launcher": "0.3.0",
105107
"lodash": "3.10.1",
106108
"madge": "^0.5.3",
107109
"markdown-doctest": "^0.3.0",

0 commit comments

Comments
 (0)