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

--projects should filter by directory #5199

Closed
ericclemmons opened this issue Dec 30, 2017 · 5 comments · Fixed by #5412
Closed

--projects should filter by directory #5199

ericclemmons opened this issue Dec 30, 2017 · 5 comments · Fixed by #5412

Comments

@ericclemmons
Copy link
Contributor

Do you want to request a feature or report a bug?

Bug.

What is the current behavior?

Jest incorrectly processes files instead of only the folders within them.

$ jest --projects packages/*
/Users/eric/Projects/my/project/packages/README.md:1
(function (exports, require, module, __filename, __dirname) { # My Project
                                                              ^

SyntaxError: Invalid or unexpected token

What is the expected behavior?

Filter by .isDirectory().

Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.

jest@22.0.4
yarn@1.3.2
node@8.9.1

@ndelangen
Copy link
Contributor

@SimenB
Copy link
Member

SimenB commented Jan 11, 2018

@ndelangen yeah

@SimenB
Copy link
Member

SimenB commented Jan 11, 2018

I'm not sure it's correct though, you should be able to pass a config file directly

@ericclemmons
Copy link
Contributor Author

See #5412.

cpojer pushed a commit that referenced this issue Feb 1, 2018
…5412)

* Add test for workspaces with a README.md in the root

* Filter projects to directories & require-able files only

This ensures `packages/*` catches folders & not README.md

* Add reference to #5199 in CHANGELOG.md

* Remove custom testDir
jessecarfb pushed a commit to jessecarfb/jest that referenced this issue Feb 2, 2018
…estjs#5412)

* Add test for workspaces with a README.md in the root

* Filter projects to directories & require-able files only

This ensures `packages/*` catches folders & not README.md

* Add reference to jestjs#5199 in CHANGELOG.md

* Remove custom testDir
@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 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 a pull request may close this issue.

4 participants