test(service-worker): support mock requests with null/empty client ID (#23625)

PR Close #23625
This commit is contained in:
George Kalpakas
2018-05-01 01:19:31 +03:00
committed by Alex Rickabaugh
parent b004be5169
commit 3df879fe17
2 changed files with 6 additions and 4 deletions

View File

@ -721,7 +721,8 @@ const manifestUpdateHash = sha1(JSON.stringify(manifestUpdate));
})();
async function makeRequest(
scope: SwTestHarness, url: string, clientId = 'default', init?: Object): Promise<string|null> {
scope: SwTestHarness, url: string, clientId: string | null = 'default',
init?: Object): Promise<string|null> {
const [resPromise, done] = scope.handleFetch(new MockRequest(url, init), clientId);
await done;
const res = await resPromise;