MCPcopy
hub / github.com/angular/angular / MockPushManager

Class MockPushManager

packages/service-worker/testing/mock.ts:89–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89export class MockPushManager {
90 private subscription: PushSubscription | null = null;
91
92 getSubscription(): Promise<PushSubscription | null> {
93 return Promise.resolve(this.subscription);
94 }
95
96 subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription> {
97 this.subscription = new MockPushSubscription() as any;
98 return Promise.resolve(this.subscription!);
99 }
100}
101
102export class MockPushSubscription {
103 unsubscribe(): Promise<boolean> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…