-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Add --ignoreProjects
CLI argument to ignore test suites by project name
#12620
Conversation
--ignoreProjects
CLI argument to ignore test suites by project …--ignoreProjects
CLI argument to ignore test suites by project name
Co-authored-by: Paavo Bennett <paavobennettis+github@gmail.com>
Just thinking out loud. I am fine with the implementation, only not so sure if word What about |
@mrazauskas I will vote for and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, I like it! can you add a changelog entry as well?
@@ -224,6 +224,10 @@ This feature is an escape-hatch. If Jest doesn't exit at the end of a test run, | |||
|
|||
Show the help information, similar to this page. | |||
|
|||
### `--ignoreProjects <project1> ... <projectN>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if both this and selectProjects
is used? Ideally it should be a configuration error. (and be mentioned in the docs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selectProjects
and ignoreProjects
could be used together. now it seems no need to do it because we don't support glob pattern, but I think to allow them to be used together will be better (not include a breaking change) because we maybe support glob in both selectProjects
and ignoreProjects
. just as Typescript allows you to use include
and exclude
together.
and I don't think there is any reason to restrict our user to use them together, If they like to, we will allow them to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see how our user's opinion here: #12618 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@F3n67u Glob support for both would be awesome as well, especially if you're using https://github.com/jest-community/jest-runner-eslint so you could do ignore *-test when running tests and ignore *-lint when running lint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind opening up a separate feature request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
}); | ||
}); | ||
|
||
describe('when Jest is started with `--selectProjects first-project second-project --ignoreProjects first-project` ', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SimenB here is the test for using --selectProjects
and --ignoreProjects
together.
done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
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. |
Summary
Add
--ignoreProjects
CLI argument to ignore test suites by project nameclose #12618
Test plan