SwUpdateMock.ts 472 Bytes
Newer Older
1 2 3
import { UpdateActivatedEvent, UpdateAvailableEvent } from '@angular/service-worker';
import { Subject } from 'rxjs';

Christopher Mark Fullarton's avatar
Christopher Mark Fullarton committed
4
export class SwUpdateMock {
5 6 7 8 9 10 11 12
  public isEnabled: true;

  public readonly available: Subject<UpdateAvailableEvent> = new Subject<UpdateAvailableEvent>();
  public readonly activated: Subject<UpdateActivatedEvent> = new Subject<UpdateActivatedEvent>();

  public checkForUpdate(): Promise<void> {
    return new Promise<void>(resolve => resolve());
  }
Christopher Mark Fullarton's avatar
Christopher Mark Fullarton committed
13
}