Skip to content

Commit bcd166a

Browse files
author
Michael Wegman
committed
test(journey): remove unnecessary activity
- No need to return the activity object
1 parent 210aa82 commit bcd166a

File tree

1 file changed

+5
-50
lines changed

1 file changed

+5
-50
lines changed

test/journeys/lib/convo.js

Lines changed: 5 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,113 +2,68 @@
22
* Unmute message notification
33
* @param {Object} spark
44
* @param {String} convo
5-
* @returns {Object}
65
*/
76
export function unmuteMessageNotification(spark, convo) {
8-
let activity;
9-
107
browser.call(() => spark.internal.conversation.unmuteMessages(convo)
11-
.then((a) => {
12-
activity = a;
13-
14-
return activity;
15-
}).catch((e) => {
8+
.catch((e) => {
169
console.error('Unable to unmute message notification');
1710
console.error(e);
1811
throw (e);
1912
}));
20-
21-
return activity;
2213
}
2314

2415
/**
2516
* Mute message notification
2617
* @param {Object} spark
2718
* @param {String} convo
28-
* @returns {Object}
2919
*/
3020
export function muteMessageNotification(spark, convo) {
31-
let activity;
32-
3321
browser.call(() => spark.internal.conversation.muteMessages(convo)
34-
.then((a) => {
35-
activity = a;
36-
37-
return activity;
38-
}).catch((e) => {
22+
.catch((e) => {
3923
console.error('Unable to mute message notification');
4024
console.error(e);
4125
throw (e);
4226
}));
43-
44-
return activity;
4527
}
4628

4729
/**
4830
* Unmute mentions notification
4931
* @param {Object} spark
5032
* @param {String} convo
51-
* @returns {Object}
5233
*/
5334
export function unmuteMentionsNotification(spark, convo) {
54-
let activity;
55-
5635
browser.call(() => spark.internal.conversation.unmuteMentions(convo)
57-
.then((a) => {
58-
activity = a;
59-
60-
return activity;
61-
}).catch((e) => {
36+
.catch((e) => {
6237
console.error('Unable to unmute mentions notification');
6338
console.error(e);
6439
throw (e);
6540
}));
66-
67-
return activity;
6841
}
6942

7043
/**
7144
* Mute mentions notification
7245
* @param {Object} spark
7346
* @param {String} convo
74-
* @returns {Object}
7547
*/
7648
export function muteMentionsNotification(spark, convo) {
77-
let activity;
78-
7949
browser.call(() => spark.internal.conversation.muteMentions(convo)
80-
.then((a) => {
81-
activity = a;
82-
83-
return activity;
84-
}).catch((e) => {
50+
.catch((e) => {
8551
console.error('Unable to mute mentions notification');
8652
console.error(e);
8753
throw (e);
8854
}));
89-
90-
return activity;
9155
}
9256

9357
/**
9458
* Remove mutes
9559
* @param {Object} spark
9660
* @param {String} convo
97-
* @returns {Object}
9861
*/
9962
export function removeAllMuteTags(spark, convo) {
100-
let activity;
101-
10263
browser.call(() => spark.internal.conversation.removeAllMuteTags(convo)
103-
.then((a) => {
104-
activity = a;
105-
106-
return activity;
107-
}).catch((e) => {
64+
.catch((e) => {
10865
console.error('Unable to remove all mute tags');
10966
console.error(e);
11067
throw (e);
11168
}));
112-
113-
return activity;
11469
}

0 commit comments

Comments
 (0)