66import assert from 'node:assert' ;
77import { describe , it } from 'node:test' ;
88
9- import type { Browser , Frame , HTTPRequest , Page , Target , CDPSession } from 'puppeteer-core' ;
9+ import type {
10+ Browser ,
11+ Frame ,
12+ HTTPRequest ,
13+ Page ,
14+ Target ,
15+ CDPSession ,
16+ } from 'puppeteer-core' ;
1017import sinon from 'sinon' ;
1118
1219import { AggregatedIssue } from '../node_modules/chrome-devtools-frontend/mcp/mcp.js' ;
@@ -302,7 +309,7 @@ describe('NetworkCollector', () => {
302309 assert . equal ( collector . getData ( page ) . length , 2 ) ;
303310 } ) ;
304311
305- it ( 'works with previous navigatedations ' , async ( ) => {
312+ it ( 'works with previous navigations ' , async ( ) => {
306313 const browser = getMockBrowser ( ) ;
307314 const page = ( await browser . pages ( ) ) [ 0 ] ;
308315 const mainFrame = page . mainFrame ( ) ;
@@ -357,8 +364,8 @@ describe('ConsoleCollector', () => {
357364 code : 'MixedContentIssue' as const ,
358365 details : {
359366 mixedContentIssueDetails : {
360- insecureURL : " test.url"
361- }
367+ insecureURL : ' test.url' ,
368+ } ,
362369 } ,
363370 } ;
364371
@@ -388,22 +395,22 @@ describe('ConsoleCollector', () => {
388395 code : 'MixedContentIssue' as const ,
389396 details : {
390397 mixedContentIssueDetails : {
391- insecureURL : " test.url"
398+ insecureURL : ' test.url' ,
392399 } ,
393400 } ,
394401 } ;
395402 const issue2 = {
396403 code : 'PropertyRuleIssue' as const ,
397404 details : {
398405 propertyRuleIssueDetails : {
399- test : " test"
406+ test : ' test' ,
400407 } ,
401408 } ,
402409 } ;
403410
404411 // @ts -expect-error Types of protocol from Puppeteer and CDP are incopatible for Issues but it's the same type
405412 cdpSession . emit ( 'Audits.issueAdded' , { issue} ) ;
406- // @ts -expect-error Types of protocol from Puppeteer and CDP are incopatible for Issues but it's the same type
413+ // @ts -expect-error Types of protocol from Puppeteer and CDP are incopatible for Issues but it's the same type
407414 cdpSession . emit ( 'Audits.issueAdded' , { issue : issue2 } ) ;
408415 const data = collector . getData ( page ) ;
409416 assert . equal ( data . length , 2 ) ;
@@ -427,7 +434,7 @@ describe('ConsoleCollector', () => {
427434 code : 'MixedContentIssue' as const ,
428435 details : {
429436 mixedContentIssueDetails : {
430- insecureURL : " test.url"
437+ insecureURL : ' test.url' ,
431438 } ,
432439 } ,
433440 } ;
0 commit comments