2014-11-26 13:50:53 -08:00
|
|
|
'use strict';
|
|
|
|
|
2014-11-26 06:55:03 -08:00
|
|
|
// karma.conf.js
|
|
|
|
module.exports = function(config) {
|
2014-12-25 14:04:03 -08:00
|
|
|
|
2014-11-26 06:55:03 -08:00
|
|
|
config.set({
|
2014-12-25 14:04:03 -08:00
|
|
|
browsers: ['Firefox'],
|
|
|
|
frameworks: ['mocha', 'detectBrowsers'],
|
|
|
|
detectBrowsers: {
|
|
|
|
enabled: true,
|
|
|
|
usePhantomJS: false,
|
|
|
|
postDetection: function(availableBrowser) {
|
|
|
|
// modify to enable additional browsers if available
|
|
|
|
var runBrowsers = ['Firefox', 'Chrome'];
|
|
|
|
var browsers = [];
|
|
|
|
for(var i = 0; i < runBrowsers.length; i++) {
|
|
|
|
if(~availableBrowser.indexOf(runBrowsers[i])) {
|
|
|
|
browsers.push(runBrowsers[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return browsers;
|
|
|
|
}
|
|
|
|
},
|
2014-11-26 13:50:53 -08:00
|
|
|
singleRun: true,
|
2014-11-26 06:55:03 -08:00
|
|
|
files: [
|
2015-01-13 14:01:23 -08:00
|
|
|
'tests.js'
|
2014-12-25 14:04:03 -08:00
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
'karma-mocha',
|
|
|
|
'karma-chrome-launcher',
|
|
|
|
'karma-firefox-launcher',
|
|
|
|
'karma-detect-browsers'
|
2014-11-26 06:55:03 -08:00
|
|
|
]
|
|
|
|
});
|
2014-12-25 14:04:03 -08:00
|
|
|
|
2014-11-26 06:55:03 -08:00
|
|
|
};
|