-
Notifications
You must be signed in to change notification settings - Fork 16
/
karma.conf.js
122 lines (107 loc) · 4.43 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/**
* Copyright (C) 2015 ZetaOps Inc.
*
* This file is licensed under the GNU General Public License v3
* (GPLv3). See LICENSE.txt for details.
*/
module.exports = function (config) {
config.set({
basePath: './',
singleRun: true,
files: [
'app/bower_components/angular/angular.js',
'app/bower_components/angular-cookies/angular-cookies.min.js',
'app/bower_components/angular-bootstrap/ui-bootstrap.min.js',
'app/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js',
'app/bower_components/angular-loading-bar/build/loading-bar.min.js',
'app/bower_components/angular-gettext/dist/angular-gettext.min.js',
'app/bower_components/angular-route/angular-route.js',
'app/bower_components/angular-resource/angular-resource.js',
'app/bower_components/showdown/dist/showdown.min.js',
'app/bower_components/angular-markdown-filter/markdown.js',
'app/bower_components/angular-sanitize/angular-sanitize.min.js',
'app/bower_components/tv4/tv4.js',
'app/bower_components/objectpath/lib/ObjectPath.js',
'app/bower_components/angular-schema-form/dist/schema-form.js',
'app/bower_components/angular-schema-form/dist/bootstrap-decorator.min.js',
'app/bower_components/angular-mocks/angular-mocks.js',
'app/bower_components/moment/min/moment.min.js',
'app/bower_components/angular-websocket/dist/angular-websocket.min.js',
'app/bower_components/angular-websocket/dist/angular-websocket-mock.js',
'app/bower_components/angular-ui-grid/ui-grid.min.js',
'app/app.js',
'app/app_routes.js',
'app/zetalib/**/!(action_service).js',
'app/components/**/*.js'
],
autoWatch: false,
frameworks: ['jasmine'],
//browsers: ['PhantomJS', 'Chrome', 'Firefox', 'Safari'],
browsers: ['PhantomJS'],
customLaunchers: {
'PhantomJS_custom': {
base: 'PhantomJS',
options: {
windowName: 'my-window',
settings: {
webSecurityEnabled: false
}
},
flags: ['--load-images=true'],
debug: true
}
},
phantomjsLauncher: {
// Have phantomjs exit if a ResourceError is encountered (useful if karma exits without killing phantom)
exitOnResourceError: true
},
plugins: [
'karma-phantomjs-launcher',
'karma-chrome-launcher',
//'karma-firefox-launcher',
//'karma-safari-launcher',
'karma-jasmine',
'karma-junit-reporter',
'karma-coverage',
'karma-spec-reporter'
],
junitReporter: {
outputFile: 'test_out/unit.xml',
suite: 'unit'
},
reporters: ['spec'],
specReporter: {
maxLogLines: 5, // limit number of lines logged per test
suppressErrorSummary: true, // do not print error summary
suppressFailed: false, // do not print information about failed tests
suppressPassed: false, // do not print information about passed tests
suppressSkipped: true, // do not print information about skipped tests
showSpecTiming: false, // print the time elapsed for each spec
failFast: true // test would finish with error when a first fail occurs.
},
preprocessors: {
'app/app.js': ['coverage'],
'app/app_routes.js': ['coverage'],
'app/components/auth/*.js': ['coverage'],
'app/components/crud/*.js': ['coverage'],
'app/components/dashboard/*.js': ['coverage'],
'app/components/version/*.js': ['coverage'],
'app/zetalib/**/!(action_service).js': ['coverage']
},
coverageReporter: {
check: {
global: {
statements: 60,
branches: 10,
functions: 60,
lines: 60,
excludes: [
'app/components/uitemplates/*.js'
]
}
},
type : 'html',
dir : 'coverage/'
}
});
};