Add Android node foundation with FCM push support

This commit is contained in:
William Valentin
2026-02-16 12:55:22 -08:00
parent 58c4b0b9bb
commit a954d7e136
11 changed files with 190 additions and 19 deletions
+16 -1
View File
@@ -233,7 +233,7 @@ describe('protocol', () => {
it('rejects invalid node push token params', () => {
expect(parseNodePushTokenSetParams({
connectionId: 'conn-1',
provider: 'fcm',
provider: 'webpush',
token: 'abcd1234abcd1234abcd1234abcd1234',
})).toBeNull();
expect(parseNodePushTokenSetParams({
@@ -247,6 +247,21 @@ describe('protocol', () => {
token: 'abcd1234abcd1234abcd1234abcd1234',
})).toBeNull();
});
it('parses valid fcm token params for android nodes', () => {
const parsed = parseNodePushTokenSetParams({
connectionId: 'conn-2',
provider: 'fcm',
token: 'fcm_abcdefghijklmnopqrstuvwxyz123456',
});
expect(parsed).toEqual({
connectionId: 'conn-2',
provider: 'fcm',
token: 'fcm_abcdefghijklmnopqrstuvwxyz123456',
topic: undefined,
environment: undefined,
});
});
});
describe('makeResponse', () => {