33 * Copyright 2025 Google LLC
44 * SPDX-License-Identifier: Apache-2.0
55 */
6- import { describe , it } from 'node:test' ;
6+ import { describe , it } from 'node:test' ;
77import assert from 'assert' ;
88
9- import { getMockRequest , html , withBrowser } from './utils.js' ;
9+ import { getMockRequest , html , withBrowser } from './utils.js' ;
1010
1111describe ( 'McpResponse' , ( ) => {
1212 it ( 'list pages' , async ( ) => {
@@ -120,7 +120,7 @@ Navigation timeout set to 100000 ms`,
120120 } ) ;
121121 it ( 'adds image when image is attached' , async ( ) => {
122122 await withBrowser ( async ( response , context ) => {
123- response . attachImage ( { data : 'imageBase64' , mimeType : 'image/png' } ) ;
123+ response . attachImage ( { data : 'imageBase64' , mimeType : 'image/png' } ) ;
124124 const result = await response . handle ( 'test' , context ) ;
125125 assert . strictEqual ( result [ 0 ] . text , `# test response` ) ;
126126 assert . equal ( result [ 1 ] . type , 'image' ) ;
@@ -267,7 +267,7 @@ Log>`),
267267describe ( 'McpResponse network pagination' , ( ) => {
268268 it ( 'returns all requests when pagination is not provided' , async ( ) => {
269269 await withBrowser ( async ( response , context ) => {
270- const requests = Array . from ( { length : 5 } , ( ) => getMockRequest ( ) ) ;
270+ const requests = Array . from ( { length : 5 } , ( ) => getMockRequest ( ) ) ;
271271 context . getNetworkRequests = ( ) => requests ;
272272 response . setIncludeNetworkRequests ( true ) ;
273273 const result = await response . handle ( 'test' , context ) ;
@@ -280,13 +280,13 @@ describe('McpResponse network pagination', () => {
280280
281281 it ( 'returns first page by default' , async ( ) => {
282282 await withBrowser ( async ( response , context ) => {
283- const requests = Array . from ( { length : 30 } , ( _ , idx ) =>
284- getMockRequest ( { method : `GET-${ idx } ` } ) ,
283+ const requests = Array . from ( { length : 30 } , ( _ , idx ) =>
284+ getMockRequest ( { method : `GET-${ idx } ` } ) ,
285285 ) ;
286286 context . getNetworkRequests = ( ) => {
287287 return requests ;
288288 } ;
289- response . setIncludeNetworkRequests ( true , { pageSize : 10 } ) ;
289+ response . setIncludeNetworkRequests ( true , { pageSize : 10 } ) ;
290290 const result = await response . handle ( 'test' , context ) ;
291291 const text = ( result [ 0 ] . text as string ) . toString ( ) ;
292292 assert . ok ( text . includes ( 'Showing 1-10 of 30 (Page 1 of 3).' ) ) ;
@@ -297,8 +297,8 @@ describe('McpResponse network pagination', () => {
297297
298298 it ( 'returns subsequent page when pageIdx provided' , async ( ) => {
299299 await withBrowser ( async ( response , context ) => {
300- const requests = Array . from ( { length : 25 } , ( _ , idx ) =>
301- getMockRequest ( { method : `GET-${ idx } ` } ) ,
300+ const requests = Array . from ( { length : 25 } , ( _ , idx ) =>
301+ getMockRequest ( { method : `GET-${ idx } ` } ) ,
302302 ) ;
303303 context . getNetworkRequests = ( ) => requests ;
304304 response . setIncludeNetworkRequests ( true , {
@@ -315,7 +315,7 @@ describe('McpResponse network pagination', () => {
315315
316316 it ( 'handles invalid page number by showing first page' , async ( ) => {
317317 await withBrowser ( async ( response , context ) => {
318- const requests = Array . from ( { length : 5 } , ( ) => getMockRequest ( ) ) ;
318+ const requests = Array . from ( { length : 5 } , ( ) => getMockRequest ( ) ) ;
319319 context . getNetworkRequests = ( ) => requests ;
320320 response . setIncludeNetworkRequests ( true , {
321321 pageSize : 2 ,
0 commit comments