postaljs / postal.js

JavaScript pub/sub library supporting advanced subscription features, and several helpful add-ons.

Home Page:http://ifandelse.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wait for messages to be delivered and processed in unit tests

dobesv opened this issue · comments

When writing unit tests involving postal, it would be nice if we had a standard way to wait for all messages to be delivered and processed. It would be great if this would also wait on any promises returned by the receiver. This would be for testing purposes only, allowing us to wait for all the receivers to run to completion before checking the results of their actions.