-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkarma.conf.js
66 lines (64 loc) · 1.89 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
'use strict';
const recursivePathToTests = 'test/**/*.ts'
, srcRecursivePath = '.tmp/drop/visual.js'
, srcCssRecursivePath = '.tmp/drop/visual.css'
, srcOriginalRecursivePath = 'src/**/*.ts'
, coverageFolder = 'coverage';
module.exports = (config) => {
config.set({
browsers: ['Firefox','Chrome','Edge'],
colors: true,
frameworks: ['jasmine'],
reporters: [
'progress',
'coverage',
'karma-remap-istanbul'
],
singleRun: true,
files: [
srcCssRecursivePath,
srcRecursivePath,
'node_modules/jquery/dist/jquery.min.js',
'node_modules/jasmine-jquery/lib/jasmine-jquery.js',
'node_modules/powerbi-visuals-utils-testutils/lib/index.js',
{
pattern: './capabilities.json',
watched: false,
served: true,
included: false
},
recursivePathToTests,
{
pattern: srcOriginalRecursivePath,
included: false,
served: true
}
],
preprocessors: {
[recursivePathToTests]: ['typescript'],
[srcRecursivePath]: ['sourcemap', 'coverage']
},
typescriptPreprocessor: {
options: {
sourceMap: false,
target: 'ES5',
removeComments: false,
concatenateOutput: false
}
},
coverageReporter: {
dir: coverageFolder,
reporters: [
{ type: 'html' },
{ type: 'lcov' }
]
},
remapIstanbulReporter: {
reports: {
lcovonly: coverageFolder + '/lcov.info',
html: coverageFolder,
'text-summary': null
}
}
});
};