-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
48 lines (47 loc) · 1.06 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
const webpackConfig = require('./webpack.config')
module.exports = config => {
config.set({
basePath: './src/script',
frameworks: ['mocha', 'power-assert'],
browsers: ['ChromeHeadless'],
mime: {
'text/x-typescript': ['ts','tsx']
},
files: [
'test/**/*.test.+(ts|tsx)',
],
preprocessors: {
'app/**/*.+(ts|tsx)': ['webpack', 'sourcemap'],
'test/**/*.test.+(ts|tsx)': ['webpack', 'sourcemap'],
},
plugins: [
'karma-coverage',
'karma-mocha',
'karma-mocha-reporter',
'karma-power-assert',
'karma-chrome-launcher',
'karma-sourcemap-writer',
'karma-sourcemap-loader',
'karma-webpack',
],
port: 9876,
concurrency: Infinity,
singleRun: true,
reporters: ['mocha'],
mochaReporter: {
colors: true,
},
browserConsoleLogOptions: {
level: '',
terminal: true,
},
loggers: [
{ type: 'console'},
],
logLevel: config.LOG_INFO,
webpack: webpackConfig,
webpackMiddleware: {
stats: 'errors-only',
},
})
}