forked from buttons/github-buttons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
42 lines (41 loc) · 873 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
import { plugins } from './rollup.config'
import istanbul from 'rollup-plugin-istanbul'
export default config => config.set({
frameworks: ['mocha', 'chai', 'sinon', 'sinon-chai'],
reporters: ['mocha', 'coverage'],
preprocessors: {
'test/**/*.spec.js': ['rollup']
},
files: [
{
pattern: 'test/**/*.spec.js',
watched: false
},
{
pattern: 'test/fixtures/**/*',
included: false,
served: true
}
],
rollupPreprocessor: {
plugins: [
...plugins,
istanbul({
include: ['**/*.js'],
exclude: ['node_modules/**', 'test/**']
})
],
output: {
format: 'iife',
sourcemap: 'inline'
}
},
coverageReporter: {
reporters: [
process.env.CI
? { type: 'lcovonly', subdir: '.' }
: { type: 'html' },
{ type: 'text-summary' }
]
}
})