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

feat(jest-config)!: remove undocumented collectCoverageOnlyFrom option #13156

Merged
merged 3 commits into from
Aug 22, 2022
Merged

feat(jest-config)!: remove undocumented collectCoverageOnlyFrom option #13156

merged 3 commits into from
Aug 22, 2022

Conversation

mrazauskas
Copy link
Contributor

Summary

Just thinking out loud. The documentation for collectCoverageOnlyFrom option was removed in #1724. Looking at #1349 (comment) and #1536 (comment) it feels like there was a plan to remove the option as well.

Nothing against it (; Simply I am playing with JSON schema for Jest config. Each extra option is addition trouble, because it needs tests, useful description, etc.

Perhaps it is time to remove collectCoverageOnlyFrom?

Test plan

Green CI.

@@ -213,7 +213,7 @@ final class JestUnitTestEngine extends ArcanistUnitTestEngine {
if (count($paths) < self::TOO_MANY_FILES_TO_COVER) {
$options[] = '--findRelatedTests ' . join(' ', $paths);
$options[] = '--coverage';
$options[] = '--collectCoverageOnlyFrom '. join(' ', $paths);
$options[] = '--collectCoverageFrom '. join(' ', $paths);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm.. Not sure how to try this out.

@@ -157,7 +157,6 @@ For stability and safety reasons, only part of the global configuration keys can
- [`changedSince`](cli#--changedsince)
- [`collectCoverage`](configuration#collectcoverage-boolean)
- [`collectCoverageFrom`](configuration#collectcoveragefrom-array)
- [`collectCoverageOnlyFrom`](configuration#collectcoverageonlyfrom-array)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

collectCoverageOnlyFrom was not documented, so this link was broken in versioned docs.

describe('collectCoverageFrom', () => {
it('substitutes <rootDir> tokens', async () => {
it('ignores <rootDir> tokens', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me (with the added deprecation warning), thanks!

@SimenB SimenB merged commit fb1c53d into jestjs:main Aug 22, 2022
@mrazauskas mrazauskas deleted the feat-remove-collectCoverageOnlyFrom-option branch August 22, 2022 07:47
@SimenB
Copy link
Member

SimenB commented Aug 22, 2022

Simply I am playing with JSON schema for Jest config.

Exciting! I never got back to it, would love to see it more complete 👍

@SimenB
Copy link
Member

SimenB commented Aug 25, 2022

@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 Sep 25, 2022
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.

3 participants