-
Notifications
You must be signed in to change notification settings - Fork 4
/
karma.conf.js
68 lines (55 loc) · 1.57 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
67
68
var babelify = require('babelify');
module.exports = function(config) {
config.set({
singleRun: false,
autoWatch: true,
basePath: '',
frameworks: ['mocha','browserify'],
// list of files / patterns to load in the browser
files: [
'src/js/components/**/*.es6',
'test/**/*.spec.js'
],
// list of files to exclude
// view component is giving me problems. excluding for now...
exclude: [
'src/js/components/view/**/*.es6'
],
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'test/**/*.spec.js': ['browserify'],
'src/js/components/**/*.es6': ['browserify']
},
browserify: {
debug: true,
paths: ['./src/js/components'],
extensions: ['.js', '.es6'],
configure: function(bundle) {
bundle.on('prebundle', function(){
bundle.transform(babelify)
})
}
},
// change Karma's debug.html to the mocha web reporter
client: {
mocha: {
reporter: 'html'
}
},
reporters: ['mocha'],
plugins: [
'karma-mocha',
'karma-mocha-reporter',
'karma-jsdom-launcher',
'karma-browserify',
'karma-chrome-launcher'
],
port: 9876,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_DEBUG,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['jsdom'],
})
}