MatthieuLemoine / push-receiver

A library to subscribe to GCM/FCM and receive notifications within a node process.
https://medium.com/@MatthieuLemoine/my-journey-to-bring-web-push-support-to-node-and-electron-ce70eea1c0b0
MIT License
198 stars 75 forks source link

Reliable enough for integration testing? #19

Open lukepighetti opened 5 years ago

lukepighetti commented 5 years ago

Hi Matthieu, really interested what you've built here and I really enjoyed your Medium article.

I was looking for a way to receive notifications on Node.js for the purpose of integration testing our FCM push notifications.

Do you feel this package is reliable enough for integration testing push notifications in a CI pipeline?

Cheers

MatthieuLemoine commented 5 years ago

Hi Luke,

It's a good idea! Never thought of it.

Well, first FCM doesn't guarantee to deliver a push notification but it almost always does 😄

About push-receiver specifically, we do have tests although they aren't run every day.

You can sometimes have issues during registration but listening for notifications works pretty well.

Would love if you could try and give me a feedback about CI usage. I think others would like this idea of testing FCM notifications.

lukepighetti commented 5 years ago

One more question I have before adding it: how long does it usually take between sending FCM notification and push-receiver getting the notification?

I looked at your tests and at first glance it looks like you're doing an end-to-end test of FCM send & receive.

MatthieuLemoine commented 5 years ago

I don't have numbers but it's a matter of seconds