1
+ function getTimestamp ( ) {
2
+ ( process . env . CI || process . env . VERBOSE ) ? new Date ( ) . toISOString ( ) : '' ;
3
+ }
4
+
5
+ function logStamp ( ...args ) {
6
+ console . log ( getTimestamp ( ) , ...args ) ;
7
+ }
8
+
1
9
class CleanReporter {
2
10
onBegin ( config , suite ) {
3
11
console . log ( `\n🎭 Running ${ suite . allTests ( ) . length } tests...\n` ) ;
@@ -15,9 +23,9 @@ class CleanReporter {
15
23
. trim ( ) ;
16
24
17
25
if ( result . status === "passed" ) {
18
- console . log ( ` ✅ ${ cleanSuite } : ${ testName } `) ;
26
+ logStamp ( ` ${ getTimestamp ( ) } ✅ ${ cleanSuite } : ${ testName } `) ;
19
27
} else if ( result . status === "failed" ) {
20
- console . log ( ` ❌ ${ cleanSuite } : ${ testName } `) ;
28
+ logStamp ( ` ${ getTimestamp ( ) } ❌ ${ cleanSuite } : ${ testName } `) ;
21
29
22
30
// Extract the most relevant error info
23
31
const error = result . error || result . errors ?. [ 0 ] ;
@@ -60,15 +68,17 @@ class CleanReporter {
60
68
61
69
onEnd ( result ) {
62
70
console . log ( "\n" + "=" . repeat ( 60 ) ) ;
63
- console . log ( `📊 TEST SUMMARY` ) ;
71
+ logStamp ( `📊 TEST SUMMARY` ) ;
64
72
console . log ( "=" . repeat ( 60 ) ) ;
65
73
66
74
console . log ( `\n🔍 FAILURE ANALYSIS:` ) ;
67
75
console . log ( `• Most failures appear to be AI service related` ) ;
68
76
console . log ( `• Check API keys and service availability` ) ;
69
- console . log (
70
- `• Run 'pnpm exec playwright show-report' for detailed HTML report`
71
- ) ;
77
+ if ( ! process . env . CI ) {
78
+ console . log (
79
+ `• Run 'pnpm exec playwright show-report' for detailed HTML report`
80
+ ) ;
81
+ }
72
82
73
83
console . log ( "=" . repeat ( 60 ) + "\n" ) ;
74
84
}
0 commit comments