Skip to content

Commit 5a88824

Browse files
committed
Fix linter and formatting after rebase
1 parent 927436f commit 5a88824

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,14 +421,15 @@ pushNotifications.send(tokens, notifications, (error, result) => {
421421
`fcm_notification` - object that will be **merged** with the notification fields. This allows you to override specific notification properties (like `channelId`, `ttl`, etc.) without duplicating standard fields like `title` and `body`.
422422

423423
For example, to set a channel ID for Android:
424+
424425
```js
425426
const data = {
426-
title: 'My Title',
427-
body: 'My Message',
427+
title: "My Title",
428+
body: "My Message",
428429
fcm_notification: {
429-
channelId: 'my-channel-id'
430+
channelId: "my-channel-id",
430431
},
431-
custom: { id: 123 }
432+
custom: { id: 123 },
432433
};
433434
```
434435

test/send/sendFCM.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ describe("push-notifications-fcm", () => {
7676
});
7777
});
7878

79-
describe('send push notifications with custom data', () => {
79+
describe("send push notifications with custom data", () => {
8080
const customDataMessage = {
81-
title: 'Notification Title',
82-
body: 'Notification Body',
81+
title: "Notification Title",
82+
body: "Notification Body",
8383
custom: {
84-
userId: '12345',
85-
actionId: 'action-001',
86-
deepLink: 'app://section/item',
84+
userId: "12345",
85+
actionId: "action-001",
86+
deepLink: "app://section/item",
8787
},
8888
};
8989

@@ -92,7 +92,7 @@ describe("push-notifications-fcm", () => {
9292
function sendCustomDataMethod() {
9393
return sinon.stub(
9494
fbMessaging.prototype,
95-
'sendEachForMulticast',
95+
"sendEachForMulticast",
9696
function sendFCMWithCustomData(firebaseMessage) {
9797
const { custom } = customDataMessage;
9898

@@ -102,8 +102,8 @@ describe("push-notifications-fcm", () => {
102102
// Verify custom data does NOT pollute the notification
103103
// Note: normalizeDataParams converts all values to strings (FCM requirement)
104104
expect(firebaseMessage.android.data).to.deep.equal(custom);
105-
expect(firebaseMessage.android.data).to.not.have.property('title');
106-
expect(firebaseMessage.android.data).to.not.have.property('body');
105+
expect(firebaseMessage.android.data).to.not.have.property("title");
106+
expect(firebaseMessage.android.data).to.not.have.property("body");
107107

108108
// Verify notification has proper fields (separate from data)
109109
expect(firebaseMessage.android.notification).to.include({
@@ -128,11 +128,11 @@ describe("push-notifications-fcm", () => {
128128
customDataSendMethod.restore();
129129
});
130130

131-
it('custom data should be preserved and not mixed with notification fields', (done) => {
131+
it("custom data should be preserved and not mixed with notification fields", (done) => {
132132
pn.send(regIds, customDataMessage)
133133
.then((results) => {
134-
expect(results).to.be.an('array');
135-
expect(results[0].method).to.equal('fcm');
134+
expect(results).to.be.an("array");
135+
expect(results[0].method).to.equal("fcm");
136136
expect(results[0].success).to.equal(1);
137137
done();
138138
})

0 commit comments

Comments
 (0)