Skip to content

Commit ad8d394

Browse files
committed
nits
1 parent 11bb3db commit ad8d394

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

spec/PushWorker.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ describe('PushWorker', () => {
9090
expect(locales).toEqual(['fr']);
9191
});
9292

93+
it('should handle empty body data', () => {
94+
expect(PushUtils.getLocalesFromPush({})).toEqual([]);
95+
});
96+
9397
it('transforms body appropriately', () => {
9498
const cleanBody = PushUtils.transformPushBodyForLocale({
9599
data: {

spec/ReadPreferenceOption.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ describe_only_db('mongo')('Read preference option', () => {
7575
});
7676

7777
expect(myObjectReadPreference).toBe(true);
78-
console.log('OK!');
7978
});
8079

8180
it('should change read preference in the beforeFind trigger', (done) => {

src/Push/PushWorker.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ export class PushWorker {
4242
}
4343
}
4444

45-
unsubscribe(): void {
46-
if (this.subscriber) {
47-
this.subscriber.unsubscribe(this.channel);
48-
}
49-
}
50-
5145
run({ body, query, pushStatus, applicationId, UTCOffset }: any): Promise<*> {
5246
const config = Config.get(applicationId);
5347
const auth = master(config);
@@ -59,8 +53,6 @@ export class PushWorker {
5953
return;
6054
}
6155
return this.sendToAdapter(body, results, pushStatus, config, UTCOffset);
62-
}, err => {
63-
throw err;
6456
});
6557
}
6658

0 commit comments

Comments
 (0)