Closed nathanstilwell closed 8 years ago
@nathanstilwell I know why you got stuck now, it’s complicated :tm: I'll fix it up and we can discuss changes then
The problem was that we used a promise in check.js
that we could not mock. We could mock the nets
call, but then the reject()
/ resolve()
calls wouldn’t happen in its callback, and the Promise returned by .check()
would remain pending.
So what I did is to move the nets
call into a utils module, so we could mock it entirely. And then add some magic to add the .abort
method to the promise. So state.request
is now the promise returned by our lib/utils/request.js
, and we set promise.abort
in there.
Does that all make sense?
I finished this up, hope you don’t mind @nathanstilwell. We got more starter issues if you’d like contribute again :) http://go.hood.ie/hoodie-starter-issues
Hey @gr2m. Not worries. Life got in the way and I timed out on this issue. Once things settle, I'm looking forward to digging back in to contributing.
Looking forward to hear back from you, whenever you feel like it :)
This is work in progress. The commits will be rebased with appropriate commit messages and documentation later.
closes #21