forked from Netflix/vector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
60 lines (47 loc) · 1.41 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
52
53
54
55
56
57
58
59
60
'use strict';
var path = require('path');
module.exports = function(config) {
var configuration = {
files: [
// required dependencies
'node_modules/angular/angular.js',
'node_modules/angular-mocks/angular-mocks.js',
// core service dependencies
'src/app/components/**/*.service.js',
'src/app/components/**/*.module.js',
'src/app/components/**/*.model.js',
// tests
'src/app/**/*.spec.js'
],
singleRun: true,
autoWatch: false,
logLevel: 'INFO',
frameworks: ['phantomjs-shim', 'jasmine', 'angular-filesort'],
angularFilesort: {
whitelist: [path.join('src', '/**/!(*.html|*.spec|*.mock).js')]
},
browsers : ['PhantomJS'],
coverageReporter: {
type : 'html',
dir : 'coverage/'
},
reporters: ['progress'],
proxies: {
'/assets/': path.join('/base/', 'src', '/assets/')
}
};
// This block is needed to execute Chrome on Travis
// If you ever plan to use Chrome and Travis, you can keep it
// If not, you can safely remove it
// 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);
};