( scope: SwTestHarness, url: string, clientId = 'default', resultingClientId = 'worker', init?: Object, )
| 2890 | } |
| 2891 | |
| 2892 | async function makeWorkerRequest( |
| 2893 | scope: SwTestHarness, |
| 2894 | url: string, |
| 2895 | clientId = 'default', |
| 2896 | resultingClientId = 'worker', |
| 2897 | init?: Object, |
| 2898 | ): Promise<string | null> { |
| 2899 | const [resPromise, done] = scope.handleFetch( |
| 2900 | new MockRequest(url, {...init, destination: 'worker'}), |
| 2901 | clientId, |
| 2902 | resultingClientId, |
| 2903 | ); |
| 2904 | await done; |
| 2905 | const res = await resPromise; |
| 2906 | if (res !== undefined && res.ok) { |
| 2907 | return res.text(); |
| 2908 | } |
| 2909 | return null; |
| 2910 | } |
| 2911 | |
| 2912 | function makeNavigationRequest( |
| 2913 | scope: SwTestHarness, |
no test coverage detected
searching dependent graphs…