refactor(service-worker): update tests based of review feedback (#25860)
- Rename invalid click event name - Make test expects more explicit - Remove NotificationClickEvent in favor of NotificationEvent PR Close #25860
This commit is contained in:

committed by
Kara Erickson

parent
c4ad83e7cd
commit
f017b26e5d
@ -72,7 +72,7 @@ interface ActivateEvent extends ExtendableEvent {}
|
||||
|
||||
// Notification API
|
||||
|
||||
interface NotificationEvent {
|
||||
interface NotificationEvent extends ExtendableEvent {
|
||||
action: string;
|
||||
notification: Notification;
|
||||
}
|
||||
@ -83,8 +83,6 @@ interface PushEvent extends ExtendableEvent {
|
||||
data: PushMessageData;
|
||||
}
|
||||
|
||||
interface NotificationClickEvent extends NotificationEvent, ExtendableEvent {}
|
||||
|
||||
interface PushMessageData {
|
||||
arrayBuffer(): ArrayBuffer;
|
||||
blob(): Blob;
|
||||
@ -116,7 +114,7 @@ interface ServiceWorkerGlobalScope {
|
||||
addEventListener(event: 'fetch', fn: (event?: FetchEvent) => any): void;
|
||||
addEventListener(event: 'install', fn: (event?: ExtendableEvent) => any): void;
|
||||
addEventListener(event: 'push', fn: (event?: PushEvent) => any): void;
|
||||
addEventListener(event: 'notificationclick', fn: (event?: NotificationClickEvent) => any): void;
|
||||
addEventListener(event: 'notificationclick', fn: (event?: NotificationEvent) => any): void;
|
||||
addEventListener(event: 'sync', fn: (event?: SyncEvent) => any): void;
|
||||
|
||||
fetch(request: Request|string): Promise<Response>;
|
||||
|
Reference in New Issue
Block a user