forked from xdan/jodit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
72 lines (71 loc) · 2 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
var webpackConfig = require('./webpack.config');
var path = require('path');
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['mocha', 'chai'],
mime: {
'text/x-typescript': ['ts','tsx'],
'image/jpeg': ['jpg'],
},
files: [
'app.css',
'src/index.ts',
'test/bootstrap.js',
'test/tests/*.js'
],
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
browsers: ['ChromeHeadless', 'IE', 'IE9', 'Firefox'],
customLaunchers: {
IE9: {
base: 'IE',
'x-ua-compatible': 'IE=EmulateIE9'
},
ChromeHeadless: {
base: 'Chrome',
flags: [
'--window-size=1920,1000',
'--disable-gpu',
//'--headless', //not work in chrome 60
'--disable-extensions',
'--disable-translate',
]
}
},
autoWatch: true,
singleRun: false, // Karma captures browsers, runs the tests and exits
concurrency: Infinity,
preprocessors: {
'src/index.ts': ['webpack'],
},
plugins: [
'karma-ie-launcher',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-mocha',
'karma-chai',
'karma-webpack',
'karma-sourcemap-loader'
],
webpack: {
devtool: 'inline-sourcemap',
module: webpackConfig.module,
plugins: webpackConfig.plugins,
resolve: webpackConfig.resolve,
output: webpackConfig.output
},
client: {
captureConsole: true
},
webpackMiddleware: {
quiet: true,
stats: {
chunks: false
},
noInfo:true,
}
})
}