-
Notifications
You must be signed in to change notification settings - Fork 2
/
karma.conf.js
43 lines (42 loc) · 986 Bytes
/
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
const summary = require('tap-summary');
const rollupConfig = require('./rollup.config.test.js');
module.exports = (karma) => {
karma.set({
basePath: '',
files: [
'vendor/tape.js',
'vendor/sinon.js',
'src/**/*.js',
'test/**/*.spec.js',
],
frameworks: ['tap'],
rollupPreprocessor: rollupConfig,
browsers: ['ChromeHeadless'],
client: { captureConsole: false },
preprocessors: {
'src/**/*.js': ['rollup'],
'test/**/*.spec.js': ['rollup'],
},
reporters: ['tap-pretty', 'coverage', 'junit'],
coverageReporter: {
reporters: [
{
type: 'lcov',
dir: 'coverage',
},
],
},
tapReporter: {
prettify: summary,
},
junitReporter: {
outputDir: 'tmp/karma-results',
},
logLevel: karma.LOG_INFO,
singleRun: true,
autoWatch: false,
browserNoActivityTimeout: 30000,
colors: true,
loggers: [{ type: 'console' }],
});
};