MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / getNetworkMultiplierFromString

Function getNetworkMultiplierFromString

src/WaitForHelper.ts:235–252  ·  view source on GitHub ↗
(
  condition: string | null,
)

Source from the content-addressed store, hash-verified

233}
234
235export function getNetworkMultiplierFromString(
236 condition: string | null,
237): number {
238 const puppeteerCondition =
239 condition as keyof typeof PredefinedNetworkConditions;
240
241 switch (puppeteerCondition) {
242 case 'Fast 4G':
243 return 1;
244 case 'Slow 4G':
245 return 2.5;
246 case 'Fast 3G':
247 return 5;
248 case 'Slow 3G':
249 return 10;
250 }
251 return 1;
252}

Callers 2

updateTimeoutsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected