From c1c6fa4594f55074bd943e9b33f9f242feb23eac Mon Sep 17 00:00:00 2001 From: Ben Kudler Date: Fri, 20 Oct 2017 10:04:12 -0400 Subject: [PATCH] adds documentation for specific config in react-scripts --- packages/react-scripts/README.md | 36 +++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/packages/react-scripts/README.md b/packages/react-scripts/README.md index 8004b887004..5a677c91832 100644 --- a/packages/react-scripts/README.md +++ b/packages/react-scripts/README.md @@ -3,5 +3,39 @@ This package includes scripts and configuration used by [Create React App](https://github.com/facebookincubator/create-react-app).
Please refer to its documentation: + +The following are also configurable: + +collectCoverageFrom +coverageReporters +coverageThreshold +snapshotSerializers + +Add any of the above to a Jest config in package.json + +for instnace: + +``json + { + "name": "your-package", + "jest": { + "collectCoverageFrom" : [ + "src/**/*.{js,jsx}", + "!/node_modules/", + "!/path/to/dir/" + ], + "coverageThreshold": { + "global": { + "branches": 90, + "functions": 90, + "lines": 90, + "statements": 90 + } + }, + "coverageReporters": ["text"], + "snapshotSerializers": ["my-serializer-module"] + } + } + * [Getting Started](https://github.com/facebookincubator/create-react-app/blob/master/README.md#getting-started) – How to create a new app. -* [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App. +* [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App. \ No newline at end of file