-
Notifications
You must be signed in to change notification settings - Fork 6
/
karma.conf.js
51 lines (38 loc) · 1.13 KB
/
karma.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
'use strict';
var path = require('path');
var conf = require('./gulp/conf');
var wiredep = require('wiredep');
function listFiles() {
var wiredepOptions = {
directory: 'bower_components',
dependencies: true,
devDependencies: true
};
return wiredep(wiredepOptions).js
.concat([path.join(conf.paths.src, '/*.js')]);
}
module.exports = function(config) {
var configuration = {
files: listFiles(),
singleRun: true,
autoWatch: false,
frameworks: ['jasmine'],
browsers : ['PhantomJS'],
plugins : [
'karma-phantomjs-launcher',
'karma-jasmine'
]
};
// This block is needed to execute Chrome on Travis.
// https://github.com/karma-runner/karma/issues/1144#issuecomment-53633076
if (configuration.browsers[0] === 'Chrome' && process.env.TRAVIS) {
configuration.customLaunchers = {
'chrome-travis-ci': {
base: 'Chrome',
flags: ['--no-sandbox']
}
};
configuration.browsers = ['chrome-travis-ci'];
}
config.set(configuration);
};