@@ -293,8 +293,6 @@ export class WorkerMain extends ProcessRunner {
293293 for ( const annotation of test . annotations )
294294 processAnnotation ( annotation ) ;
295295
296- const staticAnnotations = new Set ( testInfo . annotations ) ;
297-
298296 // Process existing annotations dynamically set for parent suites.
299297 for ( const suite of suites ) {
300298 const extraAnnotations = this . _activeSuites . get ( suite ) || [ ] ;
@@ -313,7 +311,7 @@ export class WorkerMain extends ProcessRunner {
313311 if ( isSkipped && nextTest && ! hasAfterAllToRunBeforeNextTest ) {
314312 // Fast path - this test is skipped, and there are more tests that will handle cleanup.
315313 testInfo . status = 'skipped' ;
316- this . dispatchEvent ( 'testEnd' , buildTestEndPayload ( testInfo , staticAnnotations ) ) ;
314+ this . dispatchEvent ( 'testEnd' , buildTestEndPayload ( testInfo ) ) ;
317315 return ;
318316 }
319317
@@ -495,7 +493,7 @@ export class WorkerMain extends ProcessRunner {
495493
496494 this . _currentTest = null ;
497495 setCurrentTestInfo ( null ) ;
498- this . dispatchEvent ( 'testEnd' , buildTestEndPayload ( testInfo , staticAnnotations ) ) ;
496+ this . dispatchEvent ( 'testEnd' , buildTestEndPayload ( testInfo ) ) ;
499497
500498 const preserveOutput = this . _config . config . preserveOutput === 'always' ||
501499 ( this . _config . config . preserveOutput === 'failures-only' && testInfo . _isFailure ( ) ) ;
@@ -615,15 +613,15 @@ function buildTestBeginPayload(testInfo: TestInfoImpl): TestBeginPayload {
615613 } ;
616614}
617615
618- function buildTestEndPayload ( testInfo : TestInfoImpl , staticAnnotations : Set < TestAnnotation > ) : TestEndPayload {
616+ function buildTestEndPayload ( testInfo : TestInfoImpl ) : TestEndPayload {
619617 return {
620618 testId : testInfo . testId ,
621619 duration : testInfo . duration ,
622620 status : testInfo . status ! ,
623621 errors : testInfo . errors ,
624622 hasNonRetriableError : testInfo . _hasNonRetriableError ,
625623 expectedStatus : testInfo . expectedStatus ,
626- annotations : testInfo . annotations . filter ( a => ! staticAnnotations . has ( a ) ) ,
624+ annotations : testInfo . annotations ,
627625 timeout : testInfo . timeout ,
628626 } ;
629627}
0 commit comments