-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma-config.js
53 lines (44 loc) · 1.48 KB
/
karma-config.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
/**
* Created by niek on 25-4-2016.
*/
/*var es6ify = require('es6ify');
var brfs = require('brfs');*/
var istanbul = require('browserify-istanbul');
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha', 'chai', 'sinon', 'browserify'],
files: [
'app/**/*.js',
// Angular-mocks moet na app.js geladen worden omdat daar angular in zit
'node_modules/angular-mocks/angular-mocks.js',
'test/*.spec.js'
],
reporters: ['progress', 'coverage'],
preprocessors: {
// source files, that you wanna generate coverage for
// do not include tests or libraries
// (these files will be instrumented by Istanbul)
'app/**/*.js': ['coverage', 'browserify']
},
browserify: {
debug: true,
transform: [/*es6ify, brfs, 'browserify-shim',*/ istanbul({
ignore: ['**/node_modules/**', '**/test/**'],
})],
},
// optionally, configure the reporter
coverageReporter: {
type : 'html',
dir : 'coverage/'
},
port: 9876,
colors: true,
autoWatch: true,
singleRun: false,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
browsers: ['Chrome']
});
};