Skip to content

Commit

Permalink
fix: es2015 hadn't been updated to the v5 Robot signature
Browse files Browse the repository at this point in the history
BREAKING CHANGE: version 5 introduced a new Robot signature which impacts any program using es2015.js directly.
  • Loading branch information
joeyguerra committed Jul 24, 2023
1 parent 5d94f10 commit aed26e6
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 aed26e6

Please sign in to comment.