walmartlabs / cookie-cutter

An opinionated micro-services framework for TypeScript
https://walmartlabs.github.io/cookie-cutter
Other
58 stars 35 forks source link

Support ability to test custom output sinks with `runIntegrationTest` #71

Open hienqnguyen opened 4 years ago

hienqnguyen commented 4 years ago

Currently when specified a custom output sink for a test app, it is not triggered when the app is passed to runIntegrationTest. It seems that the custom sinks are ignored after published or stored messages are captured.

This prevents custom sinks to be ingregration-tested.

sklose commented 4 years ago

What kind of sink do you want to be able to test here? The general idea behind runIntegrationTest is that you can test your message handler logic without triggering any side effects. Sinks are usually the part of your service that contains the code for the side effect.

hienqnguyen commented 4 years ago

Any sink that implements the IOutputSink interface. I can also certainly test my custom sink in a unit test, but would be nice with runIntegrationTest