Skip to content

Commit d0872d0

Browse files
committed
Add notification test
1 parent fc7bb24 commit d0872d0

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

tests/NotificationsAPI/Notification__test.js

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
open WebAPI.NotificationAPI
2+
3+
Notification.requestPermission()
4+
->Promise.thenResolve(notificationPermission => {
5+
switch notificationPermission {
6+
| Granted => Console.log("Permission granted")
7+
| Denied => Console.log("Permission denied")
8+
| Default => Console.log("Permission default")
9+
}
10+
})
11+
->Promise.done

0 commit comments

Comments
 (0)