简体   繁体   中英

Testing Hubot with hubot-test-helper and jest

I would like to test my hubot scripts, written in JavaScript, with the hubot-test-helper and jest. The lack of documentation makes it really difficult though. I am looking for someone, who is willing to share a working test?

I was having the same situation trying to test my bot with hubot-test-helper but with no luck, What I did was try it the same way they are doing in their testings, configuring mocha instead of jest and that works!. so Just review their package.json file and install and configure all as they did, then take the hello_world_test.js example and that should work. make sure you have a test folder at the same level of the package.json file (that's the quick way).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM