@@ -13,7 +13,7 @@ describe('Pipeline Events', () => {
1313 pipeline . on ( PipelineEvent . RunStart , ( payload ) => {
1414 events . push ( { event : PipelineEvent . RunStart , payload } ) ;
1515 } ) ;
16-
16+
1717 pipeline . on ( PipelineEvent . RunEnd , ( payload ) => {
1818 events . push ( { event : PipelineEvent . RunEnd , payload } ) ;
1919 } ) ;
@@ -31,7 +31,7 @@ describe('Pipeline Events', () => {
3131 pipeline . on ( PipelineEvent . ProcessorStart , ( payload ) => {
3232 events . push ( { event : PipelineEvent . ProcessorStart , payload } ) ;
3333 } ) ;
34-
34+
3535 pipeline . on ( PipelineEvent . ProcessorEnd , ( payload ) => {
3636 events . push ( { event : PipelineEvent . ProcessorEnd , payload } ) ;
3737 } ) ;
@@ -47,10 +47,10 @@ describe('Pipeline Events', () => {
4747 test ( 'should allow removing event listeners' , async ( ) => {
4848 const handler = jest . fn ( ) ;
4949 pipeline . on ( PipelineEvent . RunStart , handler ) ;
50-
50+
5151 await pipeline . process ( "Hello world!" ) ;
5252 expect ( handler ) . toHaveBeenCalledTimes ( 1 ) ;
53-
53+
5454 pipeline . off ( PipelineEvent . RunStart , handler ) ;
5555 await pipeline . process ( "Hello again!" ) ;
5656 expect ( handler ) . toHaveBeenCalledTimes ( 1 ) ; // Should not be called again
@@ -59,10 +59,10 @@ describe('Pipeline Events', () => {
5959 test ( 'should handle multiple event listeners' , async ( ) => {
6060 const handler1 = jest . fn ( ) ;
6161 const handler2 = jest . fn ( ) ;
62-
62+
6363 pipeline . on ( PipelineEvent . RunStart , handler1 ) ;
6464 pipeline . on ( PipelineEvent . RunStart , handler2 ) ;
65-
65+
6666 await pipeline . process ( "Hello world!" ) ;
6767
6868 expect ( handler1 ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -90,11 +90,11 @@ describe('Pipeline Events', () => {
9090 test ( 'should have correct event payload structure' , async ( ) => {
9191 let runStartPayload : any ;
9292 let processorStartPayload : any ;
93-
93+
9494 pipeline . on ( PipelineEvent . RunStart , ( payload ) => {
9595 runStartPayload = payload ;
9696 } ) ;
97-
97+
9898 pipeline . on ( PipelineEvent . ProcessorStart , ( payload ) => {
9999 processorStartPayload = payload ;
100100 } ) ;
0 commit comments