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

add-coverage-to-gitignore #35809

Closed

Conversation

Adnan-Bacic
Copy link
Contributor

@Adnan-Bacic Adnan-Bacic commented Jan 11, 2023

Summary

There is a large amount of autogenerated files in the coverage folder when running jest --coverage.

This folder is also in .gitignore for react projects created with create-react-app

Originally suggested here: react-native-community/discussions-and-proposals#569

Changelog

[GENERAL] [ADDED] - Added "coverage" folder generated by jest --coverage to .gitignore

Test Plan

  1. cd template
  2. yarn
  3. yarn test --coverage

Im not sure why many of the files in the template folder have an underscore(_) in the filenames instead of a dot(.). When creating a react-native project they have a dot. So if you run the above commands, the coverage folder will not be ignored since its not in .gitingore but in _gitignore. However, if you temporarily create a .gitignore file, you will see that the coverage folder is ignored.

  1. Temporarily create .gitignore file to verify that coverage folder is ignored

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 11, 2023
@Adnan-Bacic Adnan-Bacic changed the title added testing section and added coverage folder add-coverage-to-gitignore Jan 11, 2023
@facebook-github-bot
Copy link
Contributor

@jacdebug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,493,419 +0
android hermes armeabi-v7a 7,813,396 +0
android hermes x86 8,967,814 +0
android hermes x86_64 8,827,312 +0
android jsc arm64-v8a 9,679,094 +0
android jsc armeabi-v7a 8,412,803 +0
android jsc x86 9,742,206 +0
android jsc x86_64 10,220,829 +0

Base commit: 4d8ba7b
Branch: main

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jan 11, 2023
@facebook-github-bot
Copy link
Contributor

@jacdebug merged this pull request in 7324c22.

@Adnan-Bacic Adnan-Bacic deleted the add-coverage-to-gitignore branch April 21, 2023 06:06
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
There is a large amount of autogenerated files in the coverage folder when running `jest --coverage`.

This folder is also in .gitignore for react projects created with `create-react-app`

Originally suggested here: react-native-community/discussions-and-proposals#569

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[GENERAL] [ADDED] - Added "coverage" folder generated på `jest --coverage` to .gitignore

Pull Request resolved: facebook#35809

Test Plan:
1. cd template
2. yarn
3. yarn test --coverage

Im not sure why many of the files in the template folder have an underscore(_) in the filenames instead of a dot(.). When creating a react-native project they have a dot. So if you run the above commands, the coverage folder will not be ignored since its not in `.gitingore` but in `_gitignore`. However, if you temporarily create a `.gitignore` file, you will see that the coverage folder is ignored.

4. Temporarily create `.gitignore` file to verify that coverage folder is ignored

Reviewed By: cortinico

Differential Revision: D42454560

Pulled By: jacdebug

fbshipit-source-id: 0be007d3ba3dde47814c0ce0fb8b0ff9f67d637b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants