@@ -51,6 +51,7 @@ describe('BiDi Diagnostic Tools', () => {
5151 await new Promise ( r => setTimeout ( r , 500 ) ) ;
5252
5353 const result = await client . callTool ( 'get_console_logs' , { } ) ;
54+ assert . ok ( ! result . isError , `Tool returned error: ${ getResponseText ( result ) } ` ) ;
5455 const logs = JSON . parse ( getResponseText ( result ) ) ;
5556
5657 assert . ok ( logs . find ( l => l . text ?. includes ( 'Hello from console' ) ) , 'Should capture console.log' ) ;
@@ -94,6 +95,7 @@ describe('BiDi Diagnostic Tools', () => {
9495 } ) ;
9596 await new Promise ( r => setTimeout ( r , 1000 ) ) ;
9697 const result = await client . callTool ( 'get_page_errors' , { } ) ;
98+ assert . ok ( ! result . isError , `Tool returned error: ${ getResponseText ( result ) } ` ) ;
9799 const text = getResponseText ( result ) ;
98100 const errors = JSON . parse ( text ) ;
99101 const jsError = errors . find ( e => e . text ?. includes ( 'Intentional test error' ) ) ;
@@ -124,6 +126,7 @@ describe('BiDi Diagnostic Tools', () => {
124126 await new Promise ( r => setTimeout ( r , 1000 ) ) ;
125127
126128 const result = await client . callTool ( 'get_network_logs' , { } ) ;
129+ assert . ok ( ! result . isError , `Tool returned error: ${ getResponseText ( result ) } ` ) ;
127130 const logs = JSON . parse ( getResponseText ( result ) ) ;
128131
129132 const pageLoad = logs . find ( l => l . url ?. includes ( 'bidi.html' ) ) ;
0 commit comments