【发布时间】:2016-12-17 06:18:34
【问题描述】:
我希望用户提交代码并使用 AVA 针对该代码运行测试。 AVA CLI 看起来很棒。但这将在像 Heroku 这样的托管环境中运行,并且需要响应包含代码提交的 POST 请求以及单元测试的结果。
当我尝试var test = require('ava') 然后在路由中调用test 函数时,我在启动节点服务器时收到此消息:
[OKAY] Loaded ENV .env File as KEY=VALUE Format
10:24:11 PM web.1 | Test files must be run with the AVA CLI:
10:24:11 PM web.1 | $ ava index.js
[DONE] Killing all processes with signal null
10:24:11 PM web.1 Exited with exit code 1
【问题讨论】:
标签: node.js unit-testing testing automated-tests ava