snollygolly / bloodhound

:tv: Makes TV more awesome.
32 stars 5 forks source link

getListingByID test fails with timeout #45

Closed snollygolly closed 9 years ago

snollygolly commented 9 years ago
  2) Search plugin: tv_rage.js should return the proper object for .getListingByID:
     Error: timeout of 2000ms exceeded

How to make timeout less?

snollygolly commented 9 years ago

I tried running mocha with --timeout 5000 but it just took longer to fail

mikemclaren commented 9 years ago

If you're hitting a timeout, 9/10 times it's because the test is failing for reasons you're not checking against.

snollygolly commented 9 years ago

I've removed all the .to.be.a('type') tests and it passes successfully. I've also console logged the type of variables I'm trapping, and they match, but the test still fails.

mikemclaren commented 9 years ago

Can you throw up a gist/put the code in the issue?

snollygolly commented 9 years ago

https://github.com/snollygolly/bloodhound/blob/master/tests/search-plugins.js#L86-L118

mikemclaren commented 9 years ago

It seems like expect().to.be.a() isn't throwing the correct error. It's most likely an issue with Chai not playing well with co-mocha. Meeeh.

However, this is fixed.