forked from maple3142/vuejs-storage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
45 lines (45 loc) · 1.02 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
module.exports = function(config) {
const cfgs = {
basePath: '',
frameworks: ['mocha', 'chai', 'karma-typescript'],
files: ['test/**/*.ts', 'src/**/*.ts'],
exclude: [],
preprocessors: {
'**/*.ts': ['karma-typescript']
},
karmaTypescriptConfig: {
bundlerOptions: {
entrypoints: /test.*\.ts$/,
exclude: ['vue/types/vue', 'vuex/types/index']
},
compilerOptions: {
module: 'commonjs'
},
tsconfig: './tsconfig.json',
coverageOptions: {
exclude: [/interfaces\.ts$/, /test/]
}
},
coverageReporter: {
reporters: [{ type: 'lcovonly', subdir: '.' }, { type: 'json', subdir: '.' }]
},
reporters: ['progress', 'coverage', 'karma-typescript'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromeHeadless'],
singleRun: false,
concurrency: Infinity,
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
}
}
if (process.env.TRAVIS) {
cfgs.browsers = ['Chrome_travis_ci']
}
config.set(cfgs)
}