( condition: string | null, )
| 210 | } |
| 211 | |
| 212 | export function getNetworkMultiplierFromString( |
| 213 | condition: string | null, |
| 214 | ): number { |
| 215 | const puppeteerCondition = |
| 216 | condition as keyof typeof PredefinedNetworkConditions; |
| 217 | |
| 218 | switch (puppeteerCondition) { |
| 219 | case 'Fast 4G': |
| 220 | return 1; |
| 221 | case 'Slow 4G': |
| 222 | return 2.5; |
| 223 | case 'Fast 3G': |
| 224 | return 5; |
| 225 | case 'Slow 3G': |
| 226 | return 10; |
| 227 | } |
| 228 | return 1; |
| 229 | } |
no outgoing calls
no test coverage detected