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

Jest can't find tests when path contains brackets #1315

Closed
aalbul opened this issue Jul 25, 2016 · 1 comment · Fixed by #1379
Closed

Jest can't find tests when path contains brackets #1315

aalbul opened this issue Jul 25, 2016 · 1 comment · Fixed by #1379

Comments

@aalbul
Copy link

aalbul commented Jul 25, 2016

I found this problem when tried to run my project on Jenkins.
Unfortunately, i quickly realised that it cannot find tests.

I tried different combinations and was able to reproduce the problem locally. It's quiet easy. Just re-name project folder from "project" to "project (master)".
First, i though that the reason is "space" but after some debugging i found that path is used first to locate files using "contains" and then, later, regular expression is created from the path specified in "testPathDirs".

Unfortunately, it doesn't escape brackets and it lead's to "no tests found" case.

Here is my config:

{
testPathDirs: ['src/test/javascript']
testRegex: '/unit/.*-spec.(js)$'
verbose: true
}

@github-actions
Copy link

This issue 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.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant