(value?: Partial<ProxyContextValue>)
| 205 | |
| 206 | export const withProxyProvider = |
| 207 | (value?: Partial<ProxyContextValue>) => (Story: FC) => { |
| 208 | return ( |
| 209 | <ProxyContext.Provider |
| 210 | value={{ |
| 211 | latenciesLoaded: true, |
| 212 | proxyLatencies: MockProxyLatencies, |
| 213 | proxy: getPreferredProxy([], undefined), |
| 214 | proxies: [], |
| 215 | isLoading: false, |
| 216 | isFetched: true, |
| 217 | setProxy: () => { |
| 218 | return; |
| 219 | }, |
| 220 | clearProxy: () => { |
| 221 | return; |
| 222 | }, |
| 223 | refetchProxyLatencies: (): Date => { |
| 224 | return new Date(); |
| 225 | }, |
| 226 | ...value, |
| 227 | }} |
| 228 | > |
| 229 | <Story /> |
| 230 | </ProxyContext.Provider> |
| 231 | ); |
| 232 | }; |
no test coverage detected