@@ -23,32 +23,32 @@ export default class {
23
23
try {
24
24
switch ( type ) {
25
25
case 'remap' :
26
- {
27
- let reportRemap = new ReportRemap ( res , type , options ) ;
28
- reportRemap . generate ( ) ;
29
- break ;
30
- }
26
+ {
27
+ let reportRemap = new ReportRemap ( res , type , options ) ;
28
+ reportRemap . generate ( ) ;
29
+ break ;
30
+ }
31
31
case 'lcovonly' :
32
- {
33
- options = this . addFileToOptions ( options , 'lcov.info' ) ;
34
- let istanbulFile1 = new IstanbulGenericReporter ( res , type , options ) ;
35
- istanbulFile1 . generate ( ) ;
36
- break ;
37
- }
32
+ {
33
+ options = this . addFileToOptions ( options , 'lcov.info' ) ;
34
+ let istanbulFile1 = new IstanbulGenericReporter ( res , type , options ) ;
35
+ istanbulFile1 . generate ( ) ;
36
+ break ;
37
+ }
38
38
case 'json' :
39
- {
40
- options = this . addFileToOptions ( options , 'summary.json' ) ;
41
- let istanbulFile2 = new IstanbulGenericReporter ( res , type , options ) ;
42
- istanbulFile2 . generate ( ) ;
43
- break ;
44
- }
39
+ {
40
+ options = this . addFileToOptions ( options , 'summary.json' ) ;
41
+ let istanbulFile2 = new IstanbulGenericReporter ( res , type , options ) ;
42
+ istanbulFile2 . generate ( ) ;
43
+ break ;
44
+ }
45
45
case 'coverage' :
46
- {
47
- options = this . addFileToOptions ( options , 'report.json' ) ;
48
- let reportCoverage = new ReportCoverage ( res , options ) ;
49
- reportCoverage . generate ( ) ;
50
- break ;
51
- }
46
+ {
47
+ options = this . addFileToOptions ( options , 'report.json' ) ;
48
+ let reportCoverage = new ReportCoverage ( res , options ) ;
49
+ reportCoverage . generate ( ) ;
50
+ break ;
51
+ }
52
52
/*case 'teamcity':
53
53
{
54
54
options = this.addFileToOptions(options, 'teamcity.log');
@@ -57,40 +57,40 @@ export default class {
57
57
break;
58
58
}*/
59
59
case 'json-summary' :
60
- {
61
- options = this . addFileToOptions ( options , 'json_summary.json' ) ;
62
- let jsonSummary = new JsonSummary ( res , type , options ) ;
63
- jsonSummary . generate ( ) ;
64
- break ;
65
- }
60
+ {
61
+ options = this . addFileToOptions ( options , 'json_summary.json' ) ;
62
+ let jsonSummary = new JsonSummary ( res , type , options ) ;
63
+ jsonSummary . generate ( ) ;
64
+ break ;
65
+ }
66
66
case 'html' :
67
- {
68
- options = Object . assign ( { } , {
69
- 'prefix' : '/coverage/'
70
- } , options ) ;
71
- let html = new Html ( res , options ) ;
72
- html . generate ( ) ;
73
- break ;
74
- }
67
+ {
68
+ options = Object . assign ( { } , {
69
+ 'prefix' : '/coverage/'
70
+ } , options ) ;
71
+ let html = new Html ( res , options ) ;
72
+ html . generate ( ) ;
73
+ break ;
74
+ }
75
75
case 'text-summary' :
76
- {
77
- options = this . addFileToOptions ( options , 'summary.txt' ) ;
78
- let textSummary = new TextSummary ( res , type , options ) ;
79
- textSummary . generate ( ) ;
80
- break ;
81
- }
76
+ {
77
+ options = this . addFileToOptions ( options , 'summary.txt' ) ;
78
+ let textSummary = new TextSummary ( res , type , options ) ;
79
+ textSummary . generate ( ) ;
80
+ break ;
81
+ }
82
82
case 'http' :
83
- {
84
- let http = new Http ( res , options ) ;
85
- http . generate ( ) ;
86
- break ;
87
- }
83
+ {
84
+ let http = new Http ( res , options ) ;
85
+ http . generate ( ) ;
86
+ break ;
87
+ }
88
88
default :
89
- {
90
- Log . error ( 'Failed to export - this type is not implemented yet' ) ;
91
- res . writeHead ( 400 ) ;
92
- res . end ( '{"type":"This type [' + type + '] is not supported"}' ) ;
93
- }
89
+ {
90
+ Log . error ( 'Failed to export - this type is not implemented yet' ) ;
91
+ res . writeHead ( 400 ) ;
92
+ res . end ( '{"type":"This type [' + type + '] is not supported"}' ) ;
93
+ }
94
94
}
95
95
} catch ( e ) {
96
96
Log . error ( 'ReportService failed while creating report type [' , type , ']' ) ;
0 commit comments