You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After doing a fresh git clone and npm install (without a package-lock.json file), I picked up hubot-test-helper v1.8.1. As a result, the integration and smoke tests started failing with the following message:
reaction_added listener registration failed: robot.react is not a function
es2015.js was added in Hubot v3.0.0 as part of a rewrite from CoffeeScript to ES2015, and the original index.js was refactored to export CoffeeScriptCompatibleClass instances (hubotio/hubot@7939b8f).
The problem is that hubot-slack now adds the react method to the CoffeeScript-compatible wrapper function exported by the original hubot/index.js, while the original Robot implementation exported by hubot/es2015.js remains unchanged. Consequently, the MockRobot from hubot-test-helper/src/index.js did not have access to the react function, leading to the test failures.
Upgrading this repository's hubot dependency to ^3.0.01 and adding the following snippet to hubot/slack-github-issues.js resolves the issue for now (coming in a pull request immediately after I file this issue):
However, this is only a temporary solution. The proposed rewrite from CoffeeScript to ES2015 in slackapi/hubot-slack#429 should ideally rectify the problem and remove the need for the workaround.
1This also required blowing away node_modules and running npm install again, so that hubot-test-helper wasn't still working with its local copy of hubot v3.0.1. Debugging that issue produced another moment of enlightenment.
The text was updated successfully, but these errors were encountered:
Addresses the issue described in #15. In short, hubot-test-helper v1.8.0
depends on hubot-v3.0.0, both are rewrites from CoffeeScript to ES2015,
and consequently hubot-slack adds Robot.react to a CoffeeScript-
compatible wrapper function, leading to smoke and integration test
failures.
The implementation of slackapi/hubot-slack#429 (CoffeeScript-to-ES2015
rewrite) should include a fix that will eliminate the need for this
workaround.
After doing a fresh
git clone
andnpm install
(without apackage-lock.json
file), I picked up hubot-test-helper v1.8.1. As a result, the integration and smoke tests started failing with the following message:This
robot.react
method should've been added to Hubot by the hubot-slack adapter (implemented in slackapi/hubot-slack#363, released in hubot-slack v4.2.0). After a bit of digging, I realized this was because:hubot
dependency to v3.0.0, and now requireshubot/es2015
instead ofhubot
(mtsmfm/hubot-test-helper@6a621be).es2015.js
was added in Hubot v3.0.0 as part of a rewrite from CoffeeScript to ES2015, and the originalindex.js
was refactored to exportCoffeeScriptCompatibleClass
instances (hubotio/hubot@7939b8f).The problem is that
hubot-slack
now adds thereact
method to the CoffeeScript-compatible wrapper function exported by the originalhubot/index.js
, while the originalRobot
implementation exported byhubot/es2015.js
remains unchanged. Consequently, theMockRobot
fromhubot-test-helper/src/index.js
did not have access to thereact
function, leading to the test failures.Upgrading this repository's
hubot
dependency to^3.0.0
1 and adding the following snippet tohubot/slack-github-issues.js
resolves the issue for now (coming in a pull request immediately after I file this issue):However, this is only a temporary solution. The proposed rewrite from CoffeeScript to ES2015 in slackapi/hubot-slack#429 should ideally rectify the problem and remove the need for the workaround.
1This also required blowing away
node_modules
and runningnpm install
again, so thathubot-test-helper
wasn't still working with its local copy ofhubot
v3.0.1. Debugging that issue produced another moment of enlightenment.The text was updated successfully, but these errors were encountered: