forked from divyanshumittal/ionic-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
52 lines (39 loc) · 1.2 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
'use strict';
var path = require('path');
var conf = require('./gulp/conf');
var _ = require('lodash');
var wiredep = require('wiredep');
function listFiles() {
var wiredepOptions = _.extend({}, conf.wiredep, {
dependencies: true,
devDependencies: true
});
return wiredep(wiredepOptions).js
.concat([
path.join(conf.paths.src, '/**/*.module.js'),
path.join(conf.paths.src, '/**/*.js'),
path.join(conf.paths.src, '/**/*.spec.js'),
path.join(conf.paths.src, '/**/*.html')
]);
}
module.exports = function(config) {
var configuration = {
frameworks: ['mocha', 'chai', 'sinon', 'chai-sinon'],
ngHtml2JsPreprocessor: {
stripPrefix: 'src-mobile/'
},
preprocessors: {
'src/**/*.html': ['ng-html2js'],
'src/**/!(*.spec|*.mock|*.run).js': ['coverage']
},
coverageReporter: {
dir: '.stats/coverage',
reporters: [
{type: 'html', subdir: 'coverage'},
{type: 'text-summary'}
]
},
reporters: ['mocha', 'coverage', 'threshold']
};
config.set(configuration);
};