我如何 运行 在 cypress 中按名称进行单个测试?

How do I run a single test in cypress picking it by name?

我在我的一个项目中使用了 cypress。我必须将所有测试保存在一个文件中。现在 运行 只是一个测试,我正在编辑源代码,添加关键字 only to the test I want to run and the I re-run my CLI command. Is it possible to run a single test from command line picking it by name ? I'm doing that in my test,我想知道是否也可以用于 cypress。

我想你正在寻找这个图书馆https://github.com/cypress-io/cypress-grep

$ npx cypress run --env grep=hello
cypress-grep: tests with "hello" in their names