【文件属性】:
文件名称:hubot-test-helper:测试Hubot脚本的助手
文件大小:17KB
文件格式:ZIP
更新时间:2021-04-29 14:17:27
coffeescript hubot hubot-scripts JavaScript
Hubot测试助手
用于测试Hubot脚本的助手。
安装
npm install hubot-test-helper --save-dev
用法
如果您具有以下hubot脚本:
module . exports = robot =>
robot . respond ( / hi $ / i , msg => msg . reply ( 'hi' ) )
您可以像这样测试它:
const Helper = require ( 'hubot-test-helper' ) ;
// helper loads all scripts passed a directory
const helper = new Helper ( './scripts' ) ;
// helper loads a specific script if it's a file
const scriptHel
【文件预览】:
hubot-test-helper-master
----Dockerfile(37B)
----.gitignore(30B)
----README.md(7KB)
----test()
--------message-room_test.js(929B)
--------httpd-world_test.js(711B)
--------hello-world_test.coffee(636B)
--------private-message_test.js(893B)
--------hello-world_test.js(844B)
--------hello-world-listener_test.js(765B)
--------scripts()
--------custom-text-message_test.js(790B)
--------events_test.js(942B)
--------mock-response_test.js(1KB)
--------load-multiple-scripts_test.js(813B)
--------user-params_test.js(887B)
--------enter-leave_test.js(714B)
----docker-compose.yml(283B)
----LICENSE(1KB)
----package.json(736B)
----src()
--------index.js(4KB)
----.npmignore(0B)
----.travis.yml(291B)