-
Notifications
You must be signed in to change notification settings - Fork 6
Description
The way they're written, unit tests do not currently simulate network latency. They should, if only to test for improperly handled race conditions in higher-level modules.
[Aside: Because the calls to the event handlers are synchronous/blocking, it's possible that poorly written data modules could stall execution of server code for an indeterminate amount of time.
As far as making sure data sources put Promises into return.promises, my instinct is to make that explicit in the unit testing for the data sources themselves, and have a soft assert that all data modules which handle retrieve-parties and retrieve-party-events must do this. Am I missing anything here?]
(Edited: the functions don't return promises, they put them into the result.promises Array. Updated to reflect that.)