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
I have a script which is using res.random. Obviously that's hard to test for, so I want to use proxyquire to override the require that gets the possible responses, such that there's only one possible response. However I can't do this because hubot-test-helper is calling require() for me.
It'd be nice if I could just pass in a function and have that interpreted by hubot-test-helper as the plugin itself, pre-require()'d.
The text was updated successfully, but these errors were encountered:
Helper=require('hubot-test-helper')
helper=newHelper sctiptPath
room=helper.createRoomname:'bob'room.robot.Response=classextendsHelper.Response# Generated using a fair dice!random:->4
strugee
added a commit
to strugee/hubot-botsnack
that referenced
this issue
Sep 29, 2017
I have a script which is using
res.random
. Obviously that's hard to test for, so I want to use proxyquire to override the require that gets the possible responses, such that there's only one possible response. However I can't do this because hubot-test-helper is callingrequire()
for me.It'd be nice if I could just pass in a function and have that interpreted by hubot-test-helper as the plugin itself, pre-
require()
'd.The text was updated successfully, but these errors were encountered: