File tree 1 file changed +19
-12
lines changed
projects/npm-tools/packages/jest-junit-reporter/src
1 file changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -37,18 +37,25 @@ module.exports = (report) => {
37
37
} ;
38
38
39
39
const testResults = report . testResults
40
- . reduce (
41
- ( results , suite ) =>
42
- suite . testResults . length
43
- ? results . concat (
44
- suite . testResults . map ( ( test ) => ( {
45
- ...test ,
46
- testFilePath : suite . testFilePath ,
47
- } ) )
48
- )
49
- : results ,
50
- [ ]
51
- )
40
+ . reduce ( ( results , suite ) => {
41
+ if ( suite . testResults . length ) {
42
+ results . concat (
43
+ suite . testResults . map ( ( test ) => ( {
44
+ ...test ,
45
+ testFilePath : suite . testFilePath ,
46
+ } ) )
47
+ ) ;
48
+ } else if ( suite . failureMessage ) {
49
+ results . push ( {
50
+ duration : 0 ,
51
+ failureMessages : [ suite . failureMessage ] ,
52
+ fullName : suite . testFilePath ,
53
+ testFilePath : suite . testFilePath ,
54
+ } ) ;
55
+ }
56
+
57
+ return results ;
58
+ } , [ ] )
52
59
. map ( ( testCase ) => {
53
60
const results = [
54
61
{
You can’t perform that action at this time.
0 commit comments