Closed rj76 closed 9 years ago
Yea, this test is kind of wrong:
it.only('avoids dups in tracking stream', function () {
var called = 0
twitter.reconnect = function () {
called++
}
assert(!twitter.stream)
twitter.track('tacos')
twitter.track('tacos')
twitter.track('tacos')
assert.deepEqual(twitter.tracking(), ['tacos'])
assert(called, 3)
})
Well, the functionality it's testing is wrong. I'll fix it.
Actually reconnect
tests for stale, and prevents a reconnect. It's kind of confusing and bad, but I can at least improve the test.
There's a test that counts reconnects when adding the same filter, what's the idea behind this? Isn't it unnecessary (/unwanted) to reconnect when already connected for that filter?