首页 > 解决方案 > 如何使用银杏测试框架运行单一规范

问题描述

./我有一个具有 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"

有人可以告诉我我做错了什么吗?谢谢!

标签: ginkgo

解决方案


It turns out I have to put --focus before the testDir, the following command works

ginkgo --focus "test 1" testDir

推荐阅读