-
Notifications
You must be signed in to change notification settings - Fork 11
/
karma.conf.js
66 lines (55 loc) · 1.87 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
// karma.conf.js
// if debugging, disable instrumentation for coverage
var sourcePreprocessors = 'coverage';
function isDebug(argument) {
return argument === '--debug';
}
if (process.argv.some(isDebug)) {
sourcePreprocessors = [];
}
module.exports = function(config) {
config.set({
frameworks: ['jasmine-jquery', 'jasmine'],
browserConsoleLogOptions: {
level: 'log',
format: '%b %T: %m',
path: 'karma.log'
},
client: {
captureConsole: true
},
logLevel: config.LOG_DEBUG,
files: [
'./js/jquery.min.js',
'./js/jquery-ui.min.js',
'./js/bootstrap/bootstrap.min.js',
'./js/underscore.min.js',
'./js/moment.min.js',
'./js/application.js',
'./js/general-tools.js',
'./js/project-page-functions.js',
'./js/i18n.js',
// served fixtures
{ pattern: 'test/fixtures/**/*.*', included: false, served: true },
'./test/spec/*.js',
'./test/spec/support/*.js'
],
// coverage reporter generates the coverage
reporters: ['coverage', 'coveralls'],
preprocessors: {
// source files, that you wanna generate coverage for
// do not include tests or libraries
// (these files will be instrumented by Istanbul)
'./js/general-tools.js': sourcePreprocessors,
'./js/project-page-functions.js': sourcePreprocessors,
'./js/application.js': sourcePreprocessors,
'./js/i18n.js': sourcePreprocessors
},
// optionally, configure the reporter
coverageReporter: {
// type : 'html', // use this to see the code coverage
type : 'lcov', // needed by coveralls
dir : 'coverage/'
}
})
};