首页 > 解决方案 > sls create test 没有输出

问题描述

使用无服务器启动一些迟来的 TDD。

我已经按照https://serverless.com/blog/tdd-serverless/安装了 serverless-mocha-plugin

当我尝试 sls create test -f 我没有得到任何输出

我尝试了一些不同的参数,但没有结果。没有创建测试。我已经尝试过 SLS_DEBUG=true 并且那里也没有显示任何感兴趣的内容

sls 命令的输出显示调用测试和创建测试功能可用。

有人对从哪里开始调试有任何想法吗?

标签: mocha.jsserverless

解决方案


your serveless might be outdated; update it via npm install serverless -g

and your plugin is outdated as well, try installing and adding in your serverless.yml file; jest is from mocha and they're test functionality are the same

plugins:
 - serverless-jest-plugin

then install via

sls plugin install --name serverless-jest-plugin

then try the create test again


推荐阅读