forked from openplayerjs/openplayerjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
70 lines (70 loc) · 2.05 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
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
module.exports = (config) => {
config.set({
basePath: './',
browserNoActivityTimeout: 60000,
frameworks: ['mocha', 'chai', 'karma-typescript'],
files: [
{
pattern: 'src/css/**/*.svg',
watched: false,
included: false,
served: true,
},
{ pattern: 'node_modules/expect.js/index.js' },
{ pattern: 'test/player.html', type: 'dom', watched: false },
'src/css/*.css',
'src/js/**/*.ts',
'test/**/*.ts',
],
preprocessors: {
'src/js/**/*.ts': ['karma-typescript', 'coverage'],
'test/**/*.ts': 'karma-typescript',
},
karmaTypescriptConfig: {
bundlerOptions: {
sourceMap: true,
validateSyntax: false,
},
compilerOptions: {
target: 'es6',
esModuleInterop: true,
},
coverageOptions: {
instrumentation: true,
exclude: /test\/.*?\.ts$/,
threshold: {
emitWarning: true,
global: {
lines: 37,
},
},
},
reports: {
text: '.',
lcov: {
directory: 'coverage',
filename: 'lcov.info',
subdirectory: '.',
},
},
},
coverageReporter: {
dir: 'coverage',
subdir: '.',
},
reporters: ['mocha', 'karma-typescript', 'coverage'],
port: 9876,
crossOriginAttribute: false,
runnerPort: 9100,
captureTimeout: 60000,
concurrency: Infinity,
client: {
mocha: {
asyncOnly: true,
forbidOnly: true,
bail: true,
},
},
});
};