@@ -160,7 +160,6 @@ describe('incremental render NDJSON endpoint', () => {
160160
161161 const sink : incremental . IncrementalRenderSink = {
162162 add : ( chunk ) => {
163- console . log ( 'Sink.add called with chunk:' , chunk ) ;
164163 processedChunks . push ( chunk ) ;
165164 sinkAdd ( chunk ) ;
166165 } ,
@@ -224,11 +223,9 @@ describe('incremental render NDJSON endpoint', () => {
224223 req . on ( 'response' , ( res ) => {
225224 res . on ( 'data' , ( chunk : Buffer ) => {
226225 const chunkStr = chunk . toString ( ) ;
227- console . log ( 'Client received chunk:' , chunkStr ) ;
228226 streamedChunks . push ( chunkStr ) ;
229227 } ) ;
230228 res . on ( 'end' , ( ) => {
231- console . log ( 'Client response ended, total chunks received:' , streamedChunks . length ) ;
232229 resolve ( {
233230 statusCode : res . statusCode || 0 ,
234231 streamedData : streamedChunks ,
@@ -250,13 +247,11 @@ describe('incremental render NDJSON endpoint', () => {
250247 } ) ;
251248
252249 afterAll ( async ( ) => {
253- console . log ( 'afterAll' ) ;
254250 await app . close ( ) ;
255- console . log ( 'afterAll done' ) ;
256251 } ) ;
257252
258253 test ( 'calls handleIncrementalRenderRequest immediately after first chunk and processes each subsequent chunk immediately' , async ( ) => {
259- const { sink , sinkAddCalls, sinkEnd, sinkAbort, handleSpy, SERVER_BUNDLE_TIMESTAMP } =
254+ const { sinkAddCalls, sinkEnd, sinkAbort, handleSpy, SERVER_BUNDLE_TIMESTAMP } =
260255 await createBasicTestSetup ( ) ;
261256
262257 // Create the HTTP request
@@ -434,7 +429,6 @@ describe('incremental render NDJSON endpoint', () => {
434429 expect ( sinkEnd ) . toHaveBeenCalledTimes ( 1 ) ;
435430 expect ( sinkAbort ) . not . toHaveBeenCalled ( ) ;
436431 } ) ;
437- console . log ( 'sinkAddCalls' ) ;
438432 } ) ;
439433
440434 test ( 'handles empty lines gracefully in the stream' , async ( ) => {
@@ -559,7 +553,6 @@ describe('incremental render NDJSON endpoint', () => {
559553
560554 // Write first object (valid JSON)
561555 const initialObj = createInitialObject ( SERVER_BUNDLE_TIMESTAMP ) ;
562- console . log ( 'Sending initial chunk:' , initialObj ) ;
563556 req . write ( `${ JSON . stringify ( initialObj ) } \n` ) ;
564557
565558 // Wait for the server to process the first object and set up the response
@@ -584,13 +577,10 @@ describe('incremental render NDJSON endpoint', () => {
584577 } ) ;
585578
586579 // End the request
587- console . log ( 'Ending request' ) ;
588580 req . end ( ) ;
589581
590582 // Wait for the request to complete and capture the streaming response
591- console . log ( 'Waiting for response' ) ;
592583 const response = await responsePromise ;
593- console . log ( 'Response:' , response ) ;
594584
595585 // Verify the response status
596586 expect ( response . statusCode ) . toBe ( 200 ) ;
@@ -607,10 +597,8 @@ describe('incremental render NDJSON endpoint', () => {
607597 // Verify that all request chunks were processed
608598 expect ( processedChunks ) . toEqual ( chunksToSend ) ;
609599
610- console . log ( 'handleSpy' ) ;
611600 // Verify that the mock was called correctly
612601 expect ( handleSpy ) . toHaveBeenCalledTimes ( 1 ) ;
613- console . log ( 'handleSpy done' ) ;
614602
615603 await waitFor ( ( ) => {
616604 expect ( sink . end ) . toHaveBeenCalled ( ) ;
0 commit comments