【问题标题】:Testing Hubot with hubot-test-helper and jest使用 hubot-test-helper 和 jest 测试 Hubot
【发布时间】:2018-08-24 20:59:22
【问题描述】:

我想用 hubot-test-helper 和 jest 测试我用 JavaScript 编写的 hubot 脚本。但是,缺乏文档确实很困难。我正在寻找愿意分享工作测试的人?

【问题讨论】:

    标签: javascript node.js unit-testing jestjs hubot


    【解决方案1】:

    我在尝试使用 hubot-test-helper 测试我的机器人时遇到了同样的情况,但没有运气,我所做的就是按照他们在测试中所做的相同方式进行尝试,配置 mocha 而不是 jest,这很有效! .所以只需查看他们的 package.json 文件并像他们一样安装和配置所有内容,然后以 hello_world_test.js 为例,这应该可以工作。确保在 package.json 文件的同一级别有一个 test 文件夹(这是快捷方式)。

    【讨论】:

      猜你喜欢
      • 2019-09-24
      • 1970-01-01
      • 1970-01-01
      • 2017-04-20
      • 1970-01-01
      • 2015-04-26
      • 1970-01-01
      • 2018-07-04
      • 1970-01-01
      相关资源
      最近更新 更多