-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkarma.local.conf.js
95 lines (80 loc) · 2.09 KB
/
karma.local.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
var istanbul = require('browserify-istanbul');
module.exports = function(config) {
config.set({
//logLevel: 'LOG_DEBUG',
reporters: ['spec', 'coverage'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun : true,
autoWatch : false,
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
port: 9876,
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: [
'mocha',
'browserify'
],
files: [
'src/**/*.js',
'test/*.js'
],
// list of files to exclude
exclude: [],
preprocessors: {
'src/**/*.js': ['browserify', 'coverage'],
'test/**/*.js': ['browserify']
},
coverageReporter: {
reporters: [
{ type: 'html' },
{ type: 'text' },
{ type: 'lcovonly' }
],
instrumenterOptions: {
istanbul: {
noCompact: true
}
},
instrumenter: {
'test/**/*.js': 'istanbul'
},
includeAllSources: true
},
// enable / disable colors in the output (reporters and logs)
colors: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: [
'PhantomJS2'//, 'Firefox'
],
// using browserify-istanbul as suggested by
// https://github.com/karma-runner/karma-coverage/issues/16
browserify: {
debug: true,
transform: [
'babelify',
istanbul({
ignore: ['**/node_modules/**', '**/test/**']
})
]
},
babelPreprocessor: {
options: {
presets: ['es2015']
}
},
plugins: [
require("karma-nyan-reporter"),
require("karma-mocha"),
require("karma-firefox-launcher"),
require("karma-phantomjs2-launcher"),
require("karma-coverage"),
require("karma-browserify"),
require("karma-spec-reporter"),
require("karma-babel-preprocessor"),
require("babel-preset-es2015")
]
});
};