-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy pathkarma.conf.js
42 lines (41 loc) · 1.25 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
const webpackTest = require('./config/webpack.test');
module.exports = function (config) {
var conf = {
basePath: '',
frameworks: ['jasmine'],
files: [
{ pattern: './config/karma-test-shim.js', watched: false }
],
preprocessors: {
'./src/lib/src/**/*.ts': ['webpack', 'sourcemap', 'coverage'],
'./config/karma-test-shim.js': ['webpack', 'sourcemap']
},
webpack: webpackTest,
webpackMiddleware: {
stats: 'errors-only'
},
reporters: ['progress', 'kjhtml', 'coverage-istanbul'],
coverageIstanbulReporter: {
dir: 'coverage/',
reports: ['text-summary', 'html', 'lcovonly'],
fixWebpackSourcePaths: true
},
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
client: { clearContext: false },
colors: true,
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
}
};
if (process.env.TRAVIS) {
conf.browsers = ['ChromeHeadlessNoSandbox'];
conf.singleRun = true
}
config.set(conf);
};