From aed26e6d336fb6cd1851615fb008c55a691eb235 Mon Sep 17 00:00:00 2001 From: Joey Guerra Date: Sun, 23 Jul 2023 19:56:28 -0500 Subject: [PATCH] fix: es2015 hadn't been updated to the v5 Robot signature BREAKING CHANGE: version 5 introduced a new Robot signature which impacts any program using es2015.js directly. --- es2015.js | 5 ++--- test/es2015_test.js | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/es2015.js b/es2015.js index 2936427bd..0c6f377ce 100644 --- a/es2015.js +++ b/es2015.js @@ -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) } } diff --git a/test/es2015_test.js b/test/es2015_test.js index 9481e3a50..37a81cc6a 100644 --- a/test/es2015_test.js +++ b/test/es2015_test.js @@ -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') }) })