gherkin-jest
gherkin-jest copied to clipboard
Add --tags filter?
I'd like to have functionality where I can choose which tests to run by tag/annotation like the --tags
option in cucumber-js. So if I had some tests with @mobile
and others without, I could choose to run only those, skipping other tests. It doesn't look like it'd be super hard. Would you take a PR adding that functionality? If so, do you have an opinion about how it should be implemented? I'm assuming it should go in stucumber near the code that handles skip
.
Interesting idea, thanks. I'm just about to change the way annotations are handled, so it's probably best to wait until that's settled. Hoping to get the API to a stage I can put a 1.0
version on it soon and avoid majorly breaking changes after that.
Sounds good. I have a workaround for now. Let me know if I can be of any help
Hi @rdickert - how do you propose this works? Anything you want me to do for it?
@stewartml I want to be able to pass tags/annotations to run only those tests with those tags. I guess we could do it with env vars? Like TAGS=@foo,@bar jest test/features
. Then it would run @foo
and @bar
but skip @baz
or untagged tests. Does that sound like a good approach?
Also I've filed a couple of other issues on this and stucumber. Let me know if you need help with anything - looks like these libs are still missing a couple of tests, and I might have some time Friday.