Skip to content

Commit

Permalink
add-coverage-to-gitignore (#35809)
Browse files Browse the repository at this point in the history
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: #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
  • Loading branch information
Adnan-Bacic authored and facebook-github-bot committed Jan 11, 2023
1 parent 4d8ba7b commit 7324c22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions template/_gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ yarn-error.log

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage

0 comments on commit 7324c22

Please sign in to comment.