mocha.js - sls create test 没有输出
问题描述
使用无服务器启动一些迟来的 TDD。
我已经按照https://serverless.com/blog/tdd-serverless/安装了 serverless-mocha-plugin
当我尝试 sls create test -f 我没有得到任何输出
我尝试了一些不同的参数,但没有结果。没有创建测试。我已经尝试过 SLS_DEBUG=true 并且那里也没有显示任何感兴趣的内容
sls 命令的输出显示调用测试和创建测试功能可用。
有人对从哪里开始调试有任何想法吗?
解决方案
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
推荐阅读
- android - Android 应用仅使用 google 登录(无电子邮件选项)
- python - 如何制作一个为它们命名的按钮网格(即使我用“for”创建它们)
- java - checkstyle 使用的默认规则是什么?
- html - z-index 不适用于元素的绝对定位
- tableau-api - Tableau 在计算中排除列
- javascript - axios url 请求的相对路径需要本地但非托管服务器的“/”前缀
- grpc - 在 grpc 中使用连接保持活动来阻塞存根
- apache-kafka - 雪花卡夫卡连接器配置问题
- vue.js - VueJs将非反应性道具从父级添加到自定义组件?
- android - 我怎样才能为我的屏幕的某个部分实现一个viewpager?