@@ -11,7 +11,7 @@ import { CodebuffClient } from '../../src/client'
1111import {
1212 EventCollector ,
1313 getApiKey ,
14- isAuthError ,
14+ assertNoAuthError ,
1515 ensureBackendConnection ,
1616 DEFAULT_AGENT ,
1717 DEFAULT_TIMEOUT ,
@@ -40,7 +40,7 @@ describe('Integration: Event Ordering', () => {
4040 handleEvent : collector . handleEvent ,
4141 } )
4242
43- if ( isAuthError ( result . output ) ) return
43+ assertNoAuthError ( result . output )
4444
4545 const startIndex = collector . events . findIndex ( ( e ) => e . type === 'start' )
4646 expect ( startIndex ) . toBe ( 0 )
@@ -60,7 +60,7 @@ describe('Integration: Event Ordering', () => {
6060 handleEvent : collector . handleEvent ,
6161 } )
6262
63- if ( isAuthError ( result . output ) ) return
63+ assertNoAuthError ( result . output )
6464
6565 const finishIndex = collector . events . findIndex ( ( e ) => e . type === 'finish' )
6666 const lastTextIndex = collector . events
@@ -89,7 +89,7 @@ describe('Integration: Event Ordering', () => {
8989 cwd : process . cwd ( ) ,
9090 } )
9191
92- if ( isAuthError ( result . output ) ) return
92+ assertNoAuthError ( result . output )
9393
9494 const toolCalls = collector . getEventsByType ( 'tool_call' )
9595 const toolResults = collector . getEventsByType ( 'tool_result' )
@@ -120,7 +120,7 @@ describe('Integration: Event Ordering', () => {
120120 handleEvent : collector . handleEvent ,
121121 } )
122122
123- if ( isAuthError ( result . output ) ) return
123+ assertNoAuthError ( result . output )
124124
125125 // Use collector's verifyEventOrder method
126126 const hasCorrectOrder = collector . verifyEventOrder ( [ 'start' , 'finish' ] )
@@ -141,7 +141,7 @@ describe('Integration: Event Ordering', () => {
141141 handleEvent : collector . handleEvent ,
142142 } )
143143
144- if ( isAuthError ( result . output ) ) return
144+ assertNoAuthError ( result . output )
145145
146146 // Find the last finish event
147147 const finishEvents = collector . getEventsByType ( 'finish' )
@@ -170,15 +170,15 @@ describe('Integration: Event Ordering', () => {
170170 handleEvent : collector1 . handleEvent ,
171171 } )
172172
173- if ( isAuthError ( result1 . output ) ) return
173+ assertNoAuthError ( result1 . output )
174174
175175 const result2 = await client . run ( {
176176 agent : DEFAULT_AGENT ,
177177 prompt : 'Say "second"' ,
178178 handleEvent : collector2 . handleEvent ,
179179 } )
180180
181- if ( isAuthError ( result2 . output ) ) return
181+ assertNoAuthError ( result2 . output )
182182
183183 // Both should have correct ordering
184184 expect ( collector1 . verifyEventOrder ( [ 'start' , 'finish' ] ) ) . toBe ( true )
0 commit comments