( condition: string | null, )
| 233 | } |
| 234 | |
| 235 | export 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 | } |
no outgoing calls
no test coverage detected