Skellington-Closet / slack-mock

A Slack API mocker for Slack bot integration tests.
MIT License
64 stars 15 forks source link

Close server when rtm.stopServer() is invoked #26

Closed finferflu closed 6 years ago

finferflu commented 6 years ago

Fixes issue #25. I’m not sure this is the most appropriate way to fix the issue, but it does the job!

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 5a21342688d5402222006806898fc5d970eb2a1d on finferflu:fix-rtm-socket into 6bee3a002a7a002c00418340445bbb50a7df0827 on Skellington-Closet:master.

colestrode commented 6 years ago

Thanks for finding the issue and submitting the PR! This looks like the right solution, I added a few comments to tighten things up, but this looks like a great start!

finferflu commented 6 years ago

Ah yes, I missed that server.close is async, my bad!

As for your other comments, I've never really used Mocha or Sinon, and you can tell that my solution was a bit rudimental :)

Anyway, thanks for the feedback, and I'm glad my solution helped a little bit :)

finferflu commented 6 years ago

Ok, I've had another go, please let me know if you have any more feedback for improving things. Thanks!

colestrode commented 6 years ago

closes #25