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

escape testPathDirs before constructing regexes #1379

Merged
merged 4 commits into from
Aug 9, 2016

Conversation

rimunroe
Copy link
Contributor

@rimunroe rimunroe commented Aug 5, 2016

It appears that sometime between v12 and v13, jest-cli (possibly here) started treating testPathDirs as though it was composed of stringified regular expressions instead instead of strings. This meant that trying to use Jest on a project located at "/foo/(staging) project/" would fail to find any tests, as the regex used to match the folder would be /\/foo\/(staging)\// instead of /\/foo\/\(staging\)\//.

Fixes #1315

@ghost
Copy link

ghost commented Aug 5, 2016

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@ghost
Copy link

ghost commented Aug 5, 2016

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@ghost ghost added the CLA Signed ✔️ label Aug 5, 2016
@rimunroe
Copy link
Contributor Author

rimunroe commented Aug 9, 2016

Two fixes: I had a typo in one of my it calls, but for some reason the tests were still passing. Also, there was a forgotten commit on one of my branches which I have pushed up now.

@cpojer
Copy link
Member

cpojer commented Aug 9, 2016

This is awesome. Thank you so much for the fix and for bearing with us on writing a test :)

@cpojer cpojer merged commit b56e368 into jestjs:master Aug 9, 2016
@rimunroe rimunroe deleted the escape-testDirPaths-for-regexps branch August 10, 2016 12:31
@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 14, 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.

Jest can't find tests when path contains brackets
2 participants