ginkgo - 如何使用银杏测试框架运行单一规范
问题描述
./我有一个具有 4 个规格的测试套件,如下所示:
var _ = Describe("Start a Cycle", func() {
It("test 1", func() {...})
It("test 2", func() {...})
It("test 3", func() {...})
It("test 4", func() {...})
})
我只想运行 "test 1" ,以下命令不起作用,即使文档说它应该:
ginkgo testDir --focus "test 1"
有人可以告诉我我做错了什么吗?谢谢!
解决方案
It turns out I have to put --focus before the testDir, the following command works
ginkgo --focus "test 1" testDir
推荐阅读
- python - Django 项目有一个包含所有依赖项的“lib”文件夹,但是当我运行项目时,它会出现导入错误
- java - 如何使用 Google Places Autocomplete 获取位置的完整地址?
- java - 无论如何要做或模拟 CyclicBarrier.awaitAndReset()
- reactjs - 默认 React 组件未呈现 (Create-React-App)
- java - Kadane 算法实现返回不正确的结果
- python - UDP服务器没有收到scapy数据包
- javascript - ReactJS - 从 reducer 返回单个项目的操作
- asp.net - .NET 4.7 连接字符串格式的用户机密
- html - Heroku 无法检测到我的应用程序节点 buildpack,但是在 cli 中设置 buildpack 时,它说 heroku/nodejs 已经在应用程序上设置?
- amazon-web-services - 附加卷后 AWS EC2 丢失数据