Closed cstephen closed 7 years ago
Tests have been implemented for everything except the optional reconnectingCb
callback. I'm not sure if it's feasible to test reconnectingCb
since it requires intentionally losing/breaking a Twitter Streaming API connection to force it to reconnect. I've managed to make this happen in the past by setting the timeout value below 30 seconds in hashtag-count.js
, but that value is purposefully inaccessible outside of the library.
I'm not 100% sure if it's possible to unit test an ongoing/unlimited hashtag-count process, but I haven't done enough research into the possibilities yet. Everything else should be testable though, I think. This is important for maintaining backwards compatibility.