Skip to content

Commit

Permalink
Merge pull request #1653 from hubotio/es2015-to-5
Browse files Browse the repository at this point in the history
fix: es2015 hadn't been updated to the v5 Robot signature
  • Loading branch information
joeyguerra committed Jul 24, 2023
2 parents 5d94f10 + aed26e6 commit 218fdd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions es2015.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ module.exports = {
CatchAllMessage: Message.CatchAllMessage,
DataStore: DataStore.DataStore,
DataStoreUnavailable: DataStore.DataStoreUnavailable,

loadBot (adapterPath, adapterName, enableHttpd, botName, botAlias) {
return new module.exports.Robot(adapterPath, adapterName, enableHttpd, botName, botAlias)
loadBot (adapter, enableHttpd, name, alias) {
return new module.exports.Robot(adapter, enableHttpd, name, alias)
}
}
4 changes: 2 additions & 2 deletions test/es2015_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ describe('hubot/es2015', function () {
sinon.stub(Hubot, 'Robot')

expect(loadBot).to.be.a('function')
Hubot.loadBot(null, 'adapter', 'enableHttpd', 'botName', 'botAlias')
expect(Hubot.Robot).to.be.called.calledWith(null, 'adapter', 'enableHttpd', 'botName', 'botAlias')
Hubot.loadBot('adapter', 'enableHttpd', 'botName', 'botAlias')
expect(Hubot.Robot).to.be.called.calledWith('adapter', 'enableHttpd', 'botName', 'botAlias')
})
})

0 comments on commit 218fdd6

Please sign in to comment.