timgit / pg-boss

Queueing jobs in Postgres from Node.js like a boss
MIT License
2.05k stars 157 forks source link

[docs] sinon mock of setIntermediate breaks subscribe #62

Closed JulesAU closed 6 years ago

JulesAU commented 6 years ago

I just spent hours trying to figure out why job subscriptions weren't working when running in my mocha test harness.

Turns out my use of sinon to mock timers was interfering with the setImmediate call in Manager.

Others have had this problem with sinon; obviously it's not a pg-boss issue, but might be worth putting in the docs to save someone else tearing their hair out in future :-)

Cheers

timgit commented 6 years ago

🤔 That's interesting. Do you have an example of how others have "documented" this? I see a couple issues linked from your linked issue, but I don't understand what you're proposing here. How about I just close this issue like the other deps have and we're good? 😀

JulesAU commented 6 years ago

Yeah you're right. I've made the issue title more Google friendly; so hopefully if someone is having similar trouble they'll find this issue.

Closing :-)