2013-09-17 21:22:36 +00:00
|
|
|
module.exports = function(config) {
|
|
|
|
config.set({
|
2014-01-27 17:34:47 +00:00
|
|
|
frameworks: [ 'mocha' ]
|
2013-09-17 21:22:36 +00:00
|
|
|
, files: [
|
|
|
|
'build/build.js'
|
|
|
|
, 'test/bootstrap/karma.js'
|
|
|
|
, 'test/*.js'
|
|
|
|
]
|
|
|
|
, reporters: [ 'progress' ]
|
|
|
|
, colors: true
|
|
|
|
, logLevel: config.LOG_INFO
|
2013-09-18 02:13:12 +00:00
|
|
|
, autoWatch: false
|
2013-09-17 21:22:36 +00:00
|
|
|
, browsers: [ 'PhantomJS' ]
|
2014-01-27 17:34:47 +00:00
|
|
|
, browserDisconnectTimeout: 10000
|
|
|
|
, browserDisconnectTolerance: 2
|
|
|
|
, browserNoActivityTimeout: 20000
|
2013-09-18 02:13:12 +00:00
|
|
|
, singleRun: true
|
2013-09-17 21:22:36 +00:00
|
|
|
});
|
2013-09-18 02:13:12 +00:00
|
|
|
|
|
|
|
switch (process.env.CHAI_TEST_ENV) {
|
|
|
|
case 'sauce':
|
|
|
|
require('./karma.sauce')(config);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
// ...
|
|
|
|
break;
|
|
|
|
};
|
2013-09-17 21:22:36 +00:00
|
|
|
};
|