Closed gr2m closed 8 years ago
A little busy this week with Thanksgiving plans, but I'll give it a shot when I can
I found out that nock
is ok, the problem is that the callback from the nets
request does not get called immediately, so the clock.tick
calls occur before the setTimeout call.
I don’t know how to work around that yet
So yeah, I tried a few things, let’s use lolex
in unit tests only, not in combination with nock
.
For integration tests, let's set the interval to a low number, and then simply wait for the real timeouts, without faking timers
closing in favor of https://github.com/hoodiehq/hoodie-client-connection-status/pull/32
@drspaniel
Problem seems to be
nock
. I'd make it a unit test without nock, by mocking the nets method directlyDoes that work for you?