write a unit test for local notification in angular

Job ID: 34465168

Budget: $10 – $30 CAD

I need three unit test that mock the notification when that is granted, denied and prompt.

I will send you the project after you sent a message.


Method to be written unit test)

public async onNotificationToggleClick() {
const currentNotificationStatus = this.notificationToggle.checked;
const { display } = await LocalNotifications.checkPermissions();

if (display !== 'prompt') {
await this.modalHandlerService.displayModalHandler('a', 'b', 'c');

this.modalHandlerService.dismissHandler().then((data) => {

});
this.notificationToggle.checked = currentNotificationStatus;

return;
}

const { display: requestPermissions } =
await LocalNotifications.requestPermissions();
this.notificationToggle.checked = requestPermissions === 'granted';
}
Related categories: JavaScript NoSQL Couch & Mongo HTML5 Node.js AngularJS