diff --git a/karma.conf.js b/karma.conf.js index d8ab9440ae..6b7214659b 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -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) @@ -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, @@ -48,7 +63,8 @@ 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 @@ -56,6 +72,10 @@ module.exports = function (config) { // Concurrency level // how many browser should be started simultanous - concurrency: 1 + concurrency: 1, + + sauceLabs: { + testName: 'RxJS 5 browser test' + } }); -}; +}; \ No newline at end of file diff --git a/package.json b/package.json index 107b432334..8ede1737ee 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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",