|
1
|
|
|
// Karma configuration |
|
2
|
|
|
// Generated on Mon Oct 17 2016 15:46:52 GMT+0200 (CEST) |
|
3
|
|
|
var isTravis = (process.env.TRAVIS_BUILD_NUMBER) ? true : false; |
|
4
|
|
|
var browsers = ['Firefox']; |
|
5
|
|
|
if(!isTravis){ |
|
6
|
|
|
browsers = ['Chrome']; |
|
7
|
|
|
} |
|
8
|
|
|
module.exports = function (config) { |
|
9
|
|
|
config.set({ |
|
10
|
|
|
|
|
11
|
|
|
// base path that will be used to resolve all patterns (eg. files, exclude) |
|
12
|
|
|
basePath: '.', |
|
13
|
|
|
|
|
14
|
|
|
|
|
15
|
|
|
// frameworks to use |
|
16
|
|
|
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter |
|
17
|
|
|
frameworks: ['jasmine'], |
|
18
|
|
|
|
|
19
|
|
|
|
|
20
|
|
|
// list of files / patterns to load in the browser |
|
21
|
|
|
files: [ |
|
22
|
|
|
'../../core/vendor/jquery/dist/jquery.js', |
|
23
|
|
|
'../../core/vendor/underscore/underscore.js', |
|
24
|
|
|
'js/vendor/angular/angular.min.js', |
|
25
|
|
|
'tests/unit/js/mocks/*.js', |
|
26
|
|
|
'js/vendor/angular-mocks/angular-mocks.js', |
|
27
|
|
|
'js/vendor/**/*.js', |
|
28
|
|
|
'js/app/**/*.js', |
|
29
|
|
|
{ pattern: 'tests/unit/js/app/**/*.js', included: true } |
|
30
|
|
|
], |
|
31
|
|
|
|
|
32
|
|
|
|
|
33
|
|
|
// list of files to exclude |
|
34
|
|
|
exclude: [ |
|
35
|
|
|
'js/vendor/angular-mocks/ngAnimateMock.js', |
|
36
|
|
|
'js/vendor/angular-mocks/ngMock.js', |
|
37
|
|
|
'js/vendor/angular-mocks/ngMockE2E.js' |
|
38
|
|
|
], |
|
39
|
|
|
|
|
40
|
|
|
|
|
41
|
|
|
// preprocess matching files before serving them to the browser |
|
42
|
|
|
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor |
|
43
|
|
|
preprocessors: {}, |
|
44
|
|
|
|
|
45
|
|
|
|
|
46
|
|
|
// test results reporter to use |
|
47
|
|
|
// possible values: 'dots', 'progress' |
|
48
|
|
|
// available reporters: https://npmjs.org/browse/keyword/karma-reporter |
|
49
|
|
|
reporters: ['verbose'], |
|
50
|
|
|
|
|
51
|
|
|
|
|
52
|
|
|
// web server port |
|
53
|
|
|
port: 9876, |
|
54
|
|
|
|
|
55
|
|
|
|
|
56
|
|
|
// enable / disable colors in the output (reporters and logs) |
|
57
|
|
|
colors: true, |
|
58
|
|
|
|
|
59
|
|
|
|
|
60
|
|
|
// level of logging |
|
61
|
|
|
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG |
|
62
|
|
|
logLevel: config.LOG_INFO, |
|
63
|
|
|
|
|
64
|
|
|
|
|
65
|
|
|
// enable / disable watching file and executing tests whenever any file changes |
|
66
|
|
|
autoWatch: false, |
|
67
|
|
|
|
|
68
|
|
|
|
|
69
|
|
|
// start these browsers |
|
70
|
|
|
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher |
|
71
|
|
|
browsers: browsers, |
|
72
|
|
|
|
|
73
|
|
|
|
|
74
|
|
|
// Continuous Integration mode |
|
75
|
|
|
// if true, Karma captures browsers, runs the tests and exits |
|
76
|
|
|
singleRun: true |
|
77
|
|
|
}); |
|
78
|
|
|
}; |
|
79
|
|
|
|