Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("must call cancelNotification with number", () => {
OneSignal.cancelNotification(0);
// $ExpectError
OneSignal.cancelNotification("");
// $ExpectError
OneSignal.cancelNotification();
});
it("must call cancelNotification with number", () => {
OneSignal.cancelNotification(0);
// $ExpectError
OneSignal.cancelNotification("");
// $ExpectError
OneSignal.cancelNotification();
});
it('must call cancelNotification with number', () => {
OneSignal.cancelNotification(0);
// $ExpectError
OneSignal.cancelNotification('');
// $ExpectError
OneSignal.cancelNotification();
});
it("must call cancelNotification with number", () => {
OneSignal.cancelNotification(0);
// $ExpectError
OneSignal.cancelNotification("");
// $ExpectError
OneSignal.cancelNotification();
});
it('must call cancelNotification with number', () => {
OneSignal.cancelNotification(0);
// $ExpectError
OneSignal.cancelNotification('');
// $ExpectError
OneSignal.cancelNotification();
});
it('must call cancelNotification with number', () => {
OneSignal.cancelNotification(0);
// $ExpectError
OneSignal.cancelNotification('');
// $ExpectError
OneSignal.cancelNotification();
});
onReceived = (notification) => {
console.log('Notification received: ', notification);
// If we got a notification while user is in the app then dismiss it
if (notification && notification.isAppInFocus && notification.androidNotificationId) {
OneSignal.cancelNotification(notification.androidNotificationId);
}
this.updateNotificationCount();
}