diff --git a/packages/service-worker/worker/src/driver.ts b/packages/service-worker/worker/src/driver.ts index a80b69ede5..6d2f229190 100644 --- a/packages/service-worker/worker/src/driver.ts +++ b/packages/service-worker/worker/src/driver.ts @@ -580,8 +580,8 @@ export class Driver implements Debuggable, UpdateSource { * Retrieve a copy of the latest manifest from the server. */ private async fetchLatestManifest(): Promise { - const res = await this.safeFetch( - this.adapter.newRequest('/ngsw.json?ngsw-cache-bust=' + Math.random())); + const res = + await this.safeFetch(this.adapter.newRequest('ngsw.json?ngsw-cache-bust=' + Math.random())); if (!res.ok) { if (res.status === 404) { await this.deleteAllCaches(); diff --git a/packages/service-worker/worker/test/happy_spec.ts b/packages/service-worker/worker/test/happy_spec.ts index 5599af47cc..14b404926b 100644 --- a/packages/service-worker/worker/test/happy_spec.ts +++ b/packages/service-worker/worker/test/happy_spec.ts @@ -158,7 +158,7 @@ export function main() { expect(await scope.startup(true)).toEqual(true); await scope.resolveSelfMessages(); await driver.initialized; - server.assertSawRequestFor('/ngsw.json'); + server.assertSawRequestFor('ngsw.json'); server.assertSawRequestFor('/foo.txt'); server.assertSawRequestFor('/bar.txt'); server.assertSawRequestFor('/redirected.txt'); @@ -170,7 +170,7 @@ export function main() { async_it('initializes prefetched content correctly, after a request kicks it off', async() => { expect(await makeRequest(scope, '/foo.txt')).toEqual('this is foo'); await driver.initialized; - server.assertSawRequestFor('/ngsw.json'); + server.assertSawRequestFor('ngsw.json'); server.assertSawRequestFor('/foo.txt'); server.assertSawRequestFor('/bar.txt'); server.assertSawRequestFor('/redirected.txt'); @@ -230,7 +230,7 @@ export function main() { scope.updateServerState(serverUpdate); expect(await driver.checkForUpdate()).toEqual(true); - serverUpdate.assertSawRequestFor('/ngsw.json'); + serverUpdate.assertSawRequestFor('ngsw.json'); serverUpdate.assertSawRequestFor('/foo.txt'); serverUpdate.assertSawRequestFor('/redirected.txt'); serverUpdate.assertNoOtherRequests(); @@ -263,7 +263,7 @@ export function main() { scope.updateServerState(serverUpdate); expect(await driver.checkForUpdate()).toEqual(true); - serverUpdate.assertSawRequestFor('/ngsw.json'); + serverUpdate.assertSawRequestFor('ngsw.json'); serverUpdate.assertSawRequestFor('/foo.txt'); serverUpdate.assertSawRequestFor('/redirected.txt'); serverUpdate.assertNoOtherRequests(); @@ -331,7 +331,7 @@ export function main() { scope.advance(12000); await driver.idle.empty; - serverUpdate.assertSawRequestFor('/ngsw.json'); + serverUpdate.assertSawRequestFor('ngsw.json'); serverUpdate.assertSawRequestFor('/foo.txt'); serverUpdate.assertSawRequestFor('/redirected.txt'); serverUpdate.assertNoOtherRequests(); diff --git a/packages/service-worker/worker/testing/mock.ts b/packages/service-worker/worker/testing/mock.ts index 52100a628c..7ec168841d 100644 --- a/packages/service-worker/worker/testing/mock.ts +++ b/packages/service-worker/worker/testing/mock.ts @@ -73,7 +73,7 @@ export class MockServerStateBuilder { } withManifest(manifest: Manifest): MockServerStateBuilder { - this.resources.set('/ngsw.json', new MockResponse(JSON.stringify(manifest))); + this.resources.set('ngsw.json', new MockResponse(JSON.stringify(manifest))); return this; }