Skip to content

Instantly share code, notes, and snippets.

@alecxe
Created September 15, 2014 20:23
Show Gist options
  • Save alecxe/3769707d406add9d8f8b to your computer and use it in GitHub Desktop.
Save alecxe/3769707d406add9d8f8b to your computer and use it in GitHub Desktop.
var browserstackUser = 'username';
var browserstackKey = 'key';
module.exports = function (config) {
config.set({
basePath: '',
frameworks: [
'jasmine',
'jasmine-matchers'
],
files: [
'app/bower_components/angular/angular.min.js',
'app/bower_components/jquery/dist/jquery.min.js',
'app/bower_components/bootstrap/dist/js/bootstrap.min.js',
'app/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js',
'app/bower_components/angular-mocks/angular-mocks.js',
'app/bower_components/angular-once/once.js',
'app/app.js',
'app/*.js',
'app/*.html'
],
plugins: [
'karma-jasmine',
'karma-jasmine-matchers',
'karma-phantomjs-launcher',
'karma-coverage',
'karma-ng-html2js-preprocessor',
'karma-junit-reporter',
'karma-browserstack-launcher'
],
exclude: [],
reporters: ['dots', 'progress', 'coverage', 'junit'],
preprocessors: {
'app/!(*test)+(.js)': ['coverage'],
'app/*.html': ['ng-html2js']
},
coverageReporter: {
reporters: [
{type: 'html'},
{type: 'text'}
]
},
ngHtml2JsPreprocessor: {
stripPrefix: 'app/',
moduleName: 'connectivityTestApp'
},
browserStack: {
username: browserstackUser,
accessKey: browserstackKey,
build: 'speedtest',
retryLimit: 5
},
customLaunchers: {
bs_firefox_mac: {
base: 'BrowserStack',
browser: 'firefox',
browser_version: '21.0',
os: 'OS X',
os_version: 'Mountain Lion'
},
bs_iphone5: {
base: 'BrowserStack',
device: 'iPhone 5',
os: 'ios',
os_version: '6.0'
},
bs_google_nexus_android: {
base: 'BrowserStack',
device: 'Google Nexus 7',
browser : 'android',
os: 'android',
os_version: '4.1'
},
bs_ie8_windows7: {
base: 'BrowserStack',
browser: 'ie',
browser_version: '8.0',
os: 'Windows',
os_version: '7'
},
bs_ie9_windows7: {
base: 'BrowserStack',
browser: 'ie',
browser_version: '9.0',
os: 'Windows',
os_version: '7'
},
bs_chrome_mac: {
base: 'BrowserStack',
browser: 'chrome',
browser_version: 'latest',
os: 'OS X',
os_version: 'Mavericks'
}
},
browsers: [
'bs_firefox_mac',
'bs_iphone5',
'bs_google_nexus_android',
'bs_ie8_windows7',
'bs_ie9_windows7',
'bs_chrome_mac',
'PhantomJS'
],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
background: true,
captureTimeout: 60000,
singleRun: true
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment