pg-listen icon indicating copy to clipboard operation
pg-listen copied to clipboard

Test setup improvement and more tests

Open tahv0 opened this issue 6 years ago • 1 comments

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

tahv0 avatar Jan 14 '19 09:01 tahv0

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).

andywer avatar May 15 '19 07:05 andywer