@@ -31,21 +31,15 @@ class CoderReporter implements Reporter {
31
31
32
32
onStdOut ( chunk : string , test ?: TestCase , _ ?: TestResult ) : void {
33
33
if ( ! test ) {
34
- const preserve = this . config ?. preserveOutput === "always" ;
35
- if ( preserve ) {
36
- console . log ( `[stdout] ${ chunk . replace ( / \n $ / g, "" ) } ` ) ;
37
- }
34
+ console . log ( `[stdout] ${ chunk . replace ( / \n $ / g, "" ) } ` ) ;
38
35
return ;
39
36
}
40
37
this . testOutput . get ( test . id ) ! . push ( [ process . stdout , chunk ] ) ;
41
38
}
42
39
43
40
onStdErr ( chunk : string , test ?: TestCase , _ ?: TestResult ) : void {
44
41
if ( ! test ) {
45
- const preserve = this . config ?. preserveOutput === "always" ;
46
- if ( preserve ) {
47
- console . error ( `[stderr] ${ chunk . replace ( / \n $ / g, "" ) } ` ) ;
48
- }
42
+ console . error ( `[stderr] ${ chunk . replace ( / \n $ / g, "" ) } ` ) ;
49
43
return ;
50
44
}
51
45
this . testOutput . get ( test . id ) ! . push ( [ process . stderr , chunk ] ) ;
@@ -66,14 +60,11 @@ class CoderReporter implements Reporter {
66
60
this . timedOutTests . push ( test ) ;
67
61
}
68
62
69
- const outputFile = `test-results/debug-pprof-goroutine-${ test . title } .txt` ;
63
+ const fsTestTitle = test . title . replaceAll ( " " , "-" ) ;
64
+ const outputFile = `test-results/debug-pprof-goroutine-${ fsTestTitle } .txt` ;
70
65
await exportDebugPprof ( outputFile ) ;
71
66
72
- const preserve = this . config ?. preserveOutput ;
73
- const logOutput =
74
- preserve === "always" ||
75
- ( result . status !== "passed" && preserve !== "never" ) ;
76
- if ( logOutput ) {
67
+ if ( result . status !== "passed" ) {
77
68
console . log ( `Data from pprof has been saved to ${ outputFile } ` ) ;
78
69
console . log ( "==> Output" ) ;
79
70
const output = this . testOutput . get ( test . id ) ! ;
0 commit comments