Skip to content

Commit

Permalink
chore(test): update karma configuration for saucelabs environment
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Dec 10, 2015
1 parent 9996d77 commit b161058
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
28 changes: 24 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
// Generated on Tue Dec 08 2015 23:01:01 GMT-0800 (Pacific Standard Time)

module.exports = function (config) {
// Check out https://saucelabs.com/platforms for expanding browser coverage
var customLaunchers = {
sl_chrome: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows 10',
version: '46'
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
version: '30'
}
};

config.set({

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

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

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

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

// Concurrency level
// how many browser should be started simultanous
concurrency: 1
concurrency: 1,

sauceLabs: {
testName: 'RxJS 5 browser test'
}
});
};
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"cover": "istanbul cover -x \"*-spec.js index.js *-helper.js spec/helpers/*\" ./node_modules/jasmine/bin/jasmine.js && npm run cover_remapping",
"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",
"test": "jasmine",
"test_karma": "karma start karma.conf.js",
"tests2png": "mkdirp img && JASMINE_CONFIG_PATH=spec/support/tests2png.json jasmine",
"watch": "watch \"echo triggering build && npm run build_test && echo build completed\" src -d -u -w=15",
"perf": "protractor protractor.conf.js",
Expand Down Expand Up @@ -102,6 +103,7 @@
"karma-browserify": "4.4.2",
"karma-chrome-launcher": "0.2.2",
"karma-jasmine": "0.3.6",
"karma-sauce-launcher": "0.3.0",
"lodash": "3.10.1",
"madge": "^0.5.3",
"markdown-doctest": "^0.3.0",
Expand Down

0 comments on commit b161058

Please sign in to comment.