File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed
Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -49,22 +49,16 @@ class StkReporter implements Reporter {
4949 }
5050
5151 onTestEnd ( test : TestCase , result : TestResult ) {
52- // Console Reporter similar to Playwright's Dot Reporter:
53- // '·' for passed test
54- // '×' for attempt for retry
55- // 'T' for timed out
56- // 'F' for failed test
57-
58- if ( test . outcome ( ) === 'expected' ) {
59- process . stdout . write ( '·' )
60- } else {
61- const titlePath = test . titlePath ( ) . filter ( t => t !== '' ) . join ( ' › ' )
62-
63- const out = test . results . length <= test . retries ? '×' : ( result . status === 'timedOut' ? 'T' : 'F' )
64- process . stdout . write ( out )
65-
52+ // Console Reporter similar to Playwright's List Reporter:
53+ const resultMark = test . ok ( ) ? '✓' : '✘'
54+ const titlePath = test . titlePath ( ) . filter ( t => t !== '' ) . join ( ' › ' )
55+ const retryLabel = test . results . length > 1 ? `(retry #${ test . results . length - 1 } ) ` : ''
56+ const duration = `[${ ms ( result . duration ) } ]`
57+ console . log ( `${ resultMark } ${ titlePath } ${ retryLabel } ${ duration } ` )
58+
59+ if ( result . status !== test . expectedStatus ) {
6660 // Compile error messages and snippets
67- let testResult = `${ titlePath } ${ test . results . length > 1 ? `(retry # ${ test . results . length - 1 } ) ` : '' } [ ${ ms ( result . duration ) } ] ` + '\n\n'
61+ let testResult = `${ titlePath } ${ retryLabel } ${ duration } ` + '\n\n'
6862 if ( result . errors . length >= 1 ) {
6963 result . errors . forEach ( error => {
7064 if ( error . message ) {
You can’t perform that action at this time.
0 commit comments