-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
89 lines (79 loc) · 1.69 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
module.exports = config => {
config.set({
basePath: './app',
files: [
{
pattern: 'https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.js',
watched: false
},
{
pattern: 'bower_components/angular-mocks/angular-mocks.js',
watched: false
},
'./**/*.test.js'
],
preprocessors: {
'./**/*.test.js': ['webpack']
},
webpack: {
module: {
preLoaders: [
{
test: /\.js$/,
loader: 'istanbul-instrumenter',
exclude: /(node_modules|bower_components|\.test\.js$)/,
query: {
esModules: true
}
}
],
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['es2015']
}
},
{
test: /\.json$/,
loader: 'json'
},
{
test: /\.pug$/,
loader: 'ngtemplate!html!jade-html'
},
{
test: /\.(?:styl|jpg)$/,
loader: 'ignore'
}
]
},
externals: {
angular: true
}
},
webpackMiddleware: {
stats: 'errors-only'
},
autoWatch: true,
frameworks: ['mocha'],
browsers: ['Firefox'],
reporters: ['mocha', 'coverage'],
coverageReporter: {
reporters: [
{
type: 'lcovonly',
dir: '../coverage/',
subdir: 'lcov'
},
{
type: 'html',
dir: '../coverage/',
subdir: 'html'
}
]
}
});
};