apollographql / graphql-subscriptions

:newspaper: A small module that implements GraphQL subscriptions for Node.js
MIT License
1.59k stars 133 forks source link

Convert tests to properly await all promises #176

Open grantwwu opened 6 years ago

grantwwu commented 6 years ago

Right now a lot of the tests don't really await promises that they send off; it's better to return promises to mocha, as described in https://wietse.loves.engineering/testing-promises-with-mocha-90df8b7d2e35

This already caused 1 unhandled promise rejection issue, which I recently fixed as part of https://github.com/apollographql/graphql-subscriptions/pull/148.