Skip to content

Commit

Permalink
Add karma tests run on saucelabs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstrat authored and ichernev committed Dec 25, 2013
1 parent 8b21db0 commit 205a04f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 6 deletions.
46 changes: 45 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,54 @@ module.exports = function (grunt) {
'test/moment/**/*.js',
'test/lang/**/*.js',
'test/browser.js'
]
],
sauceLabs: {
startConnect: true,
testName: 'MomentJS'
},
customLaunchers: {
sl_chrome_win_xp: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows XP'
},
sl_ie9_win7: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '9'
},
sl_ie8_win7: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '8'
},
sl_ff_linux: {
base: 'SauceLabs',
browserName: 'firefox',
platform: 'Linux',
},
sl_safari_osx: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.8',
}
},
},
chrome: {
singleRun: true,
browsers: ['Chrome'],
},
sauce: {
singleRun: true,
browsers: [
'sl_chrome_win_xp',
'sl_ie9_win7',
'sl_ie8_win7',
'sl_ff_linux',
'sl_safari_osx'
]
}
},

Expand Down Expand Up @@ -131,6 +174,7 @@ module.exports = function (grunt) {
//test tasks
grunt.registerTask('test:node', ['nodeunit']);
grunt.registerTask('test:browser', ['concat', 'embed_languages', 'karma:chrome']);
grunt.registerTask('test:sauce-browser', ['concat', 'embed_languages', 'karma:sauce']);

// Task to be run when releasing a new version
grunt.registerTask('release', ['jshint', 'nodeunit', 'concat',
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@
"grunt-contrib-uglify": "latest",
"grunt-contrib-watch": "latest",
"grunt-lib-legacyhelpers": "latest",
"karma-chrome-launcher": "~0.1.0",
"karma-firefox-launcher": "~0.1.0",
"karma": "~0.10.4",
"grunt-karma": "~0.6.2",
"karma-nodeunit": "~0.1.1"
"grunt-karma": "https://github.com/karma-runner/grunt-karma/archive/a8472d47240a71673cb5601acba6a093fe7387c1.tar.gz",
"karma": "~0.11.0",
"karma-nodeunit": "~0.1.1",
"karma-sauce-launcher": "~0.1"
},
"scripts": {
"test": "grunt"
Expand Down

0 comments on commit 205a04f

Please sign in to comment.