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

Use all --testPathPattern and <regexForTestFiles> args in testPathPattern #5066

Merged
merged 2 commits into from
Dec 12, 2017
Merged

Use all --testPathPattern and <regexForTestFiles> args in testPathPattern #5066

merged 2 commits into from
Dec 12, 2017

Conversation

seanpoulter
Copy link
Contributor

Summary

This PR changes:

  • the type of the --testPathPattern arg to match the multiple allowed values
  • the way multiple --testPathPattern args are joined to form a valid regular expression
  • the way --testPathPattern args are joined with the default <regexForTestFiles> args

This closes #5037.

Test plan

Tests have been added to check the way the args are joined.
Evaluating the two test cases from #5037 also produce expected patterns:

> jest --testPathPattern=aa --testPathPattern=bb
...
WAS: Pattern: aa,bb
NOW: Pattern: aa|bb

> jest aa --testPathPattern=bb
...
WAS: Pattern: bb
NOW: Pattern: aa|bb

@codecov-io
Copy link

Codecov Report

Merging #5066 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5066      +/-   ##
==========================================
- Coverage   60.76%   60.75%   -0.01%     
==========================================
  Files         198      198              
  Lines        6603     6602       -1     
  Branches        4        4              
==========================================
- Hits         4012     4011       -1     
  Misses       2591     2591
Impacted Files Coverage Δ
packages/jest-config/src/normalize.js 91.95% <ø> (ø) ⬆️
packages/jest-config/src/validate_pattern.js 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 036eb60...3a54877. Read the comment docs.

Copy link
Collaborator

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

Nice cleanup!

@cpojer cpojer merged commit c3db693 into jestjs:master Dec 12, 2017
@cpojer
Copy link
Member

cpojer commented Dec 12, 2017

Thanks for contributing to Jest <3

@seanpoulter
Copy link
Contributor Author

Happy to see things move so quickly!

Any suggestions on the next issue? I'm looking at Help Wanted. 😁

@SimenB
Copy link
Member

SimenB commented Dec 16, 2017

@seanpoulter help with getting open PRs over the line would be great 🙂 As well as hardening the codeframe merged yesterday (I'll create an issue for it)

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong test path pattern from CLI args
6 participants