-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
111 lines (106 loc) · 2.68 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
module.exports = function (config) {
config.set({
basePath: 'src',
files: [{
pattern: 'spec.context.js',
watched: false
}],
preprocessors: {
'spec.context.js': ['webpack', 'sourcemap'],
// '**/*.js': ['coverage']
},
client: {
mocha: {
reporter: 'html', // change Karma's debug.html to mocha web reporter
ui: 'bdd',
},
},
coverageReporter: {
reporters: [{
type: 'lcov',
dir: '../coverage',
subdir: '.'
},
{
type: 'text-summary'
},
],
includeAllSources: true,
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
frameworks: ['jasmine'],
browsers: ['PhantomJS'],
reporters: ['mocha', 'coverage'],
singleRun: true,
concurrency: Infinity,
webpack: {
devtool: 'inline-source-map',
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/,
use: [{
loader: 'ng-annotate-loader',
options: {
add: true
}
},
{
loader: 'babel-loader'
},
]
}, {
test: /\.html$/,
use: [{
loader: 'html-loader',
options: {
attrs: ['img:src', 'link:href']
}
}]
}, {
test: /\.scss$/,
use: [{
loader: "style-loader"
}, {
loader: "css-loader",
options: {
sourceMap: true
}
}, {
loader: "fast-sass-loader"
}]
}, {
test: /\.eot(\?.*)?$/,
loader: 'file-loader?name=fonts/[name].[hash].[ext]'
}, {
test: /\.(woff|woff2)(\?.*)?$/,
loader: 'file-loader?name=fonts/[name].[hash].[ext]'
}, {
test: /\.ttf(\?.*)?$/,
loader: 'url-loader?limit=1000&mimetype=application/octet-stream&name=fonts/[name].[hash].[ext]'
}, {
test: /\.svg(\?.*)?$/,
loader: 'url-loader?limit=1000&mimetype=image/svg+xml&name=fonts/[name].[hash].[ext]'
}, {
test: /\.(jpe?g|png|gif)(\?.*)?$/i,
exclude: /node_modules/,
loader: 'url-loader?limit=1000&name=images/[name].[hash].[ext]'
}, {
test: /\.ico$/,
exclude: /node_modules/,
loader: 'url-loader?limit=1000&name=[name].[hash].[ext]'
}, {
test: /\.json$/,
exclude: /node_modules/,
loader: 'json-loader?name=[name].[hash].[ext]'
}]
}
},
webpackMiddleware: {
noInfo: true
}
});
};