Open msabramo opened 8 years ago
Tests I believe were previously broken.
Looks good to me. Do we have an owner for hubot-auth?
Cool, thanks! Yep, I still have merge perms.
Have you been actively running this code? Also, will it need updated version constraints in package.json, ie for the earliest hubot version it will work with?
Yeah, I've been running this code with our hubot instance at work for a few days.
It uses robot.listenerMiddleware
so it sounds like from https://github.com/github/hubot/blob/master/CHANGELOG.md that this will need at least hubot 2.14.0. I'll go ahead and update the package.json
to reflect that...
Thanks! Rats... mock-adaptor doesn't seem to work against that version of hubot. Haven't been using hubot lately -- any suggestions on the current best-practice for hubot testing?
@michaelansel: Do you have recommendations for how @patcon can fix the tests?
It looks like https://github.com/michaelansel/hubot-approval/blob/master/test/approval-test.coffee is using a combination of chai
, sinon
, and sinon-chai
. I don't know what those things are because I'm new to NodeJS, but I saw hubot-approval using them, so maybe they're the current state of the art?
Yup, it's an open issue on the core. Up to @patcon to decide how to handle failing tests for his project.
For more conversation on testing patterns, take a look at the open issue on the core: github/hubot#985
Useful so that hubot-auth can be used with hubot-approval
Cc: @michaelansel