Skip to content

Commit 36c3496

Browse files
committed
Removing the redundant testcase
1 parent 6b477ac commit 36c3496

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

lib/utils.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,6 @@ function buildCustomNotification(_) {
195195
function buildNotification(notificationData) {
196196
let notification;
197197

198-
if(!notificationData) {
199-
LOG._warn && LOG.warn(messages.NO_OBJECT_FOR_NOTIFY);
200-
return;
201-
}
202-
203198
if (Object.keys(notificationData).length === 0) {
204199
LOG._warn && LOG.warn(messages.EMPTY_OBJECT_FOR_NOTIFY);
205200
return;

srv/service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class NotificationService extends cds.Service {
1010
* @param {object} message - The message object
1111
*/
1212
emit (event, message) {
13-
if(!event) {
13+
if (!event) {
1414
LOG._warn && LOG.warn(messages.NO_OBJECT_FOR_NOTIFY);
1515
return;
1616
}

test/lib/utils.test.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -553,11 +553,6 @@ describe("Test utils", () => {
553553
// ).toBeFalsy();
554554
// });
555555

556-
test("When no notification data for custom notification is passed to buildNotification", () => {
557-
expect(buildNotification(undefined)).toBeFalsy();
558-
expect(buildNotification(null)).toBeFalsy();
559-
});
560-
561556
test("Given invalid NTypes | When validateNotificationTypes is called | Then false is returned", () => {
562557
expect(validateNotificationTypes([{ NotificationTypeKey: "Test" }, { blabla: "Test2" }])).toEqual(false);
563558
});

0 commit comments

Comments
 (0)