From ad00d0830f9b1670908a067481b133c8da0b2709 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Thu, 8 Jul 2021 16:25:14 +0300 Subject: [PATCH] refactor(service-worker): remove unused variables and imports from tests (#42736) This commit removes some unused variables (and associated imports) from `integration_spec.ts`. PR Close #42736 --- packages/service-worker/test/integration_spec.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/service-worker/test/integration_spec.ts b/packages/service-worker/test/integration_spec.ts index 68152ec565..7b0de6b4d5 100644 --- a/packages/service-worker/test/integration_spec.ts +++ b/packages/service-worker/test/integration_spec.ts @@ -9,7 +9,7 @@ import {NgswCommChannel} from '@angular/service-worker/src/low_level'; import {SwPush} from '@angular/service-worker/src/push'; import {SwUpdate} from '@angular/service-worker/src/update'; -import {MockServiceWorkerContainer, MockServiceWorkerRegistration} from '@angular/service-worker/testing/mock'; +import {MockServiceWorkerContainer} from '@angular/service-worker/testing/mock'; import {CacheDatabase} from '@angular/service-worker/worker/src/db-cache'; import {Driver} from '@angular/service-worker/worker/src/driver'; import {Manifest} from '@angular/service-worker/worker/src/manifest'; @@ -78,7 +78,6 @@ const serverUpdate = describe('ngsw + companion lib', () => { let mock: MockServiceWorkerContainer; let comm: NgswCommChannel; - let reg: MockServiceWorkerRegistration; let scope: SwTestHarness; let driver: Driver; @@ -102,7 +101,6 @@ describe('ngsw + companion lib', () => { }); mock.setupSw(); - reg = mock.mockRegistration!; await Promise.all(scope.handleFetch(new MockRequest('/only.txt'), 'default')); await driver.initialized; @@ -117,9 +115,7 @@ describe('ngsw + companion lib', () => { const update = new SwUpdate(comm); scope.updateServerState(serverUpdate); - const gotUpdateNotice = (async () => { - const notice = await obsToSinglePromise(update.available); - })(); + const gotUpdateNotice = (async () => await obsToSinglePromise(update.available))(); await update.checkForUpdate(); await gotUpdateNotice;