pg-listen
pg-listen copied to clipboard
Test setup improvement and more tests
This module has very little tests or no tests at all for some scenarios. There is need for movement from "production tested" to improved test system. I think that this module needs following tests
Module promises:
- Module promises reconnection and Error handling. no tests
- Tests for continuous health checks. no tests
- Proper error handling very little tests
Other tests could be:
- "Stress testing". Trigger hundreds or thousands events in Postgres db and handle events
- Test for module imports (commonjs, es6 import)
- listen many channels with single subscriber
The situation has improved a bit: There is now an integration test that makes sure the library re-connects properly, that the channels are re-subscribed to and that notifications still work afterwards.
Test coverage should still be improved, though (see above).