Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Sep 19, 2023
1 parent 7b1c83c commit ded25ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
5 changes: 4 additions & 1 deletion packages/e2e-test-utils-playwright/src/lighthouse/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import type { Page } from '@playwright/test';
import * as lighthouse from 'lighthouse/core/index.cjs';

export class Lighthouse {
constructor( public readonly page: Page, public readonly port: number ) {
constructor(
public readonly page: Page,
public readonly port: number
) {
this.page = page;
this.port = port;
}
Expand Down
15 changes: 9 additions & 6 deletions packages/e2e-test-utils-playwright/src/metrics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ export class Metrics {
performance.getEntriesByType(
'navigation'
) as PerformanceNavigationTiming[]
)[ 0 ].serverTiming.reduce( ( acc, entry ) => {
if ( f.length === 0 || f.includes( entry.name ) ) {
acc[ entry.name ] = entry.duration;
}
return acc;
}, {} as Record< string, number > ),
)[ 0 ].serverTiming.reduce(
( acc, entry ) => {
if ( f.length === 0 || f.includes( entry.name ) ) {
acc[ entry.name ] = entry.duration;
}
return acc;
},
{} as Record< string, number >
),
fields
);
}
Expand Down

0 comments on commit ded25ba

Please sign in to comment.