Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add match option #477

Closed
wants to merge 1 commit into from
Closed

Add match option #477

wants to merge 1 commit into from

Conversation

matthewbauer
Copy link

This aims to resolve issue #476. --match can be passed to ava which
means to only run tests with a title matching the provided match
string. The skipped metadata flag will be added to each test not
matching the match string.

@@ -48,6 +48,7 @@ var cli = meow([
' --tap, -t Generate TAP output',
' --verbose, -v Enable verbose output',
' --no-cache Disable the transpiler cache',
' --grep, -g Only run tests matching pattern',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only run tests matching a pattern

@sindresorhus sindresorhus changed the title Implement a "grep" option in runner. Add grep option Jan 27, 2016
This aims to resolve issue avajs#476. --match can be passed to ava which
means to only run tests with a title matching the provided match
string. The skipped metadata flag will be added to each test not
matching the match string.
@matthewbauer matthewbauer changed the title Add grep option Add match option Jan 27, 2016
@matthewbauer matthewbauer force-pushed the grep1 branch 2 times, most recently from a19bded to f3c8a58 Compare January 27, 2016 18:15
@@ -48,6 +48,7 @@ var cli = meow([
' --tap, -t Generate TAP output',
' --verbose, -v Enable verbose output',
' --no-cache Disable the transpiler cache',
' --match, -m Only run tests with titles matching',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only run tests with matching title

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flag docs also needs to be reflected in the CLI help output in the readme.

@jamestalmage
Copy link
Contributor

I think we've decided on slightly different semantics for all this (see the final few comments in #476).

Specifically, there is discussion of sudo globs (only * supported) and negation with a ! prefix.

@sindresorhus - do you feel the issue is settled?

@matthewbauer - Are you willing to update this PR?

@sindresorhus
Copy link
Member

@jamestalmage Let's wait until after the weekend. Would like @vdemedes feedback on #476.

@sindresorhus
Copy link
Member

@matthewbauer Can you also fix the merge conflict?

Sorry about the back and forth. Glad we finally have a resolution on this.

@sindresorhus
Copy link
Member

Should it be possible to use it multiple times? I'm thinking --match='*oo' --match='!foo'.

We also need to document the syntax somewhere, the * wildcard and ! negation.

@sindresorhus
Copy link
Member

@matthewbauer Just a friendly ping :)

@sindresorhus
Copy link
Member

Closing for lack of activity. Would be happy to reopen if this get's any updates, but I want to give other users the opportunity to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants