Skip to content

Commit

Permalink
Fix prettier linting failures by formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Dec 16, 2024
1 parent 484025e commit e46e83f
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions cli/commands/benchmark-web-vitals.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
/**
* External dependencies
*/
import puppeteer, { Browser, PredefinedNetworkConditions, KnownDevices } from 'puppeteer';
import puppeteer, {
Browser,
PredefinedNetworkConditions,
KnownDevices,
} from 'puppeteer';
import round from 'lodash-es/round.js';

/* eslint-disable jsdoc/valid-types */
Expand Down Expand Up @@ -103,7 +107,8 @@ export const options = [
},
{
argname: '-e, --emulate-device <device>',
description: 'Enable a specific device by name, for example "Moto G4" or "iPad"',
description:
'Enable a specific device by name, for example "Moto G4" or "iPad"',
},
{
argname: '-w, --window-viewport <dimensions>',
Expand Down Expand Up @@ -171,7 +176,9 @@ function getParamsFromOptions( opt ) {
cpuThrottleFactor: null,
networkConditions: null,
emulateDevice: null,
windowViewport: ! opt.emulateDevice ? { width: 960, height: 700 } : null, // Viewport similar to @wordpress/e2e-test-utils 'large' configuration.
windowViewport: ! opt.emulateDevice
? { width: 960, height: 700 }
: null, // Viewport similar to @wordpress/e2e-test-utils 'large' configuration.
};

if ( isNaN( params.amount ) ) {
Expand Down Expand Up @@ -473,8 +480,10 @@ async function benchmarkURL(
}
if ( params.windowViewport ) {
await page.setViewport( {
...( params.emulateDevice ? params.emulateDevice.viewport : {} ),
...params.windowViewport
...( params.emulateDevice
? params.emulateDevice.viewport
: {} ),
...params.windowViewport,
} );
}

Expand Down

0 comments on commit e46e83f

Please sign in to comment.