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

Resolve #5216 #5269

Merged
merged 1 commit into from
Jan 10, 2018
Merged

Resolve #5216 #5269

merged 1 commit into from
Jan 10, 2018

Commits on Jan 9, 2018

  1. Resolve #5216

    PR #5054 added a call to `replacePathSepForRegex` to escape values of the
    `--testPathPattern` and `<regexForTestFiles>` CLI options. Since the Windows
    path separator and the regular expression special character delimeter are the
    same character, this can lead to ambiguous patterns (e.g.: `app\book\d*\`).
    
    This commit:
    - Removes escaping CLI args with `replacePathSepForRegex` to leave them as is
      unless it's a POSIX path separator on Windows
    
    - Changes the tests in `normalize.test.js` to run the same test suite for
      `--testPathPattern` and `<regexForTestFiles>`
    
    - Reverts the changes to `replacePathSepForRegex` from #5230 but keeps the tests
      for the intended behavior. It will be complicated to escape the "safe" cases
      when `\` is a path separator and not a regular expression delimeter. Instead
      of getting fancy, we can urge Windows users to use `/` or `\\` as a path
      separator.
    seanpoulter committed Jan 9, 2018
    Configuration menu
    Copy the full SHA
    f901aa4 View commit details
    Browse the repository at this point in the history