28
28
29
29
const webpackConfig = require ( "./test.webpack.config.js" ) ;
30
30
const tsconfig = require ( "./test.tsconfig.json" ) ;
31
+ const path = require ( "path" ) ;
31
32
32
33
const testRecursivePath = "test/visualTest.ts" ;
33
34
const srcOriginalRecursivePath = "src/**/*.ts" ;
34
- const srcRecursivePath = ".tmp/drop/**/*.js" ;
35
35
const coverageFolder = "coverage" ;
36
- const globals = "./test/globals.ts" ;
37
36
38
37
process . env . CHROME_BIN = require ( "puppeteer" ) . executablePath ( ) ;
39
38
@@ -47,12 +46,13 @@ module.exports = (config: Config) => {
47
46
frameworks : [ "jasmine" ] ,
48
47
reporters : [
49
48
"progress" ,
49
+ "junit" ,
50
50
"coverage-istanbul"
51
51
] ,
52
- coverageIstanbulReporter : {
53
- reports : [ "html" , "lcovonly" , "text-summary" ] ,
54
- combineBrowserReports : true ,
55
- fixWebpackSourcePaths : true
52
+ junitReporter : {
53
+ outputDir : path . join ( __dirname , coverageFolder ) ,
54
+ outputFile : "TESTS-report.xml" ,
55
+ useBrowserName : false
56
56
} ,
57
57
singleRun : true ,
58
58
plugins : [
@@ -62,38 +62,54 @@ module.exports = (config: Config) => {
62
62
"karma-jasmine" ,
63
63
"karma-sourcemap-loader" ,
64
64
"karma-chrome-launcher" ,
65
+ "karma-junit-reporter" ,
65
66
"karma-coverage-istanbul-reporter"
66
67
] ,
67
68
files : [
68
69
"node_modules/jquery/dist/jquery.min.js" ,
69
70
"node_modules/jasmine-jquery/lib/jasmine-jquery.js" ,
70
- globals ,
71
- srcRecursivePath ,
72
71
testRecursivePath ,
73
72
{
74
73
pattern : srcOriginalRecursivePath ,
75
74
included : false ,
76
75
served : true
77
76
} ,
78
77
{
79
- pattern : ' ./capabilities.json' ,
78
+ pattern : " ./capabilities.json" ,
80
79
watched : false ,
81
80
served : true ,
82
81
included : false
83
82
}
84
83
] ,
85
84
preprocessors : {
86
- [ testRecursivePath ] : [ "webpack" ] ,
87
- [ srcRecursivePath ] : [ "webpack" , "coverage" ]
85
+ [ testRecursivePath ] : [ "webpack" , "coverage" ]
88
86
} ,
89
87
typescriptPreprocessor : {
90
88
options : tsconfig . compilerOptions
91
89
} ,
90
+ coverageIstanbulReporter : {
91
+ reports : [ "html" , "lcovonly" , "text-summary" , "cobertura" ] ,
92
+ dir : path . join ( __dirname , coverageFolder ) ,
93
+ 'report-config' : {
94
+ html : {
95
+ subdir : 'html-report'
96
+ }
97
+ } ,
98
+ combineBrowserReports : true ,
99
+ fixWebpackSourcePaths : true ,
100
+ verbose : false
101
+ } ,
92
102
coverageReporter : {
93
- dir : coverageFolder ,
103
+ dir : path . join ( __dirname , coverageFolder ) ,
94
104
reporters : [
95
- { type : "html" } ,
96
- { type : "lcov" }
105
+ // reporters not supporting the `file` property
106
+ { type : 'html' , subdir : 'html-report' } ,
107
+ { type : 'lcov' , subdir : 'lcov' } ,
108
+ // reporters supporting the `file` property, use `subdir` to directly
109
+ // output them in the `dir` directory
110
+ { type : 'cobertura' , subdir : '.' , file : 'cobertura-coverage.xml' } ,
111
+ { type : 'lcovonly' , subdir : '.' , file : 'report-lcovonly.txt' } ,
112
+ { type : 'text-summary' , subdir : '.' , file : 'text-summary.txt' } ,
97
113
]
98
114
} ,
99
115
mime : {
0 commit comments