This repository was archived by the owner on May 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 187
/
Copy pathkarma.conf.js
62 lines (53 loc) · 1.48 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
var buildConfig = require('./build.config.js');
var path = require('canonical-path');
module.exports = function(includeCodeCoverage){
var config = {};
config.files = [
// Include jQuery only for testing convience (lots of DOM checking for unit tests on directives)
'http://codeorigin.jquery.com/jquery-1.10.2.min.js',
'config/lib/js/angular/angular.js',
'config/lib/js/angular/angular-animate.js',
'config/lib/js/angular/angular-sanitize.js',
'config/lib/js/angular/angular-mocks.js',
'config/lib/js/angular-ui/angular-ui-router.js',
'config/lib/testutil.js'
]
.concat(buildConfig.ionicFiles)
.concat(buildConfig.angularIonicFiles)
.concat('test/unit/**/*.js');
config.exclude = ['js/ext/angular/test/dom-trace.js'];
config.frameworks = ['jasmine'];
config.reporters = ['progress'];
config.port = 9876;
config.colors = true;
config.logLevel = 'INFO';
config.autoWatch = true;
config.captureTimeout = 60000;
config.singleRun = false;
config.mochaReporter = {
output: 'full'
};
config.browsers = ['Chrome'];
if ( includeCodeCoverage ){
config.preprocessors = {'js/**/*.js': 'coverage'};
config.reporters.push('coverage');
config.coverageReporter = {
reporters: [
{
type: 'text'
},
{
type: 'text-summary'
},
{
type: 'cobertura',
file: 'coverage.xml'
},
{
type: 'lcov'
}
]
};
}
return config;
}