Added testing instructions to devtools contributing guide
Brian Vaughn committed
Jul 28, 2021 at 19:05 UTC
d9dd96530f366f0e9062095a513f1b04e71ffaf0
1 file changed
+11
packages/react-devtools/CONTRIBUTING.md
+11
@@ -1,3 +1,4 @@
1
+
2
Intrested in contributing to React DevTools, but not sure where to start? This is the place!
3
4
# Install project dependencies
@@ -63,6 +64,16 @@ This will launch a standalone version of Chrome with the locally built React Dev
64
yarn build:chrome && yarn test:chrome --url=<url-to-test>
65
```
66
67
+# Unit tests
68
+Core DevTools functionality is typically unit tested (see [here](https://github.com/facebook/react/tree/main/packages/react-devtools-shared/src/__tests__) and [here](https://github.com/facebook/react/tree/main/packages/react-devtools-extensions/src/__tests__)). To run tests, you'll first need to build or download React and React DOM ([as explained above](#build-react-and-react-dom)) and then use the following NPM script:
69
+```sh
70
+yarn test-build-devtools
71
+```
72
+You can connect tests to a debugger as well if you'd like by running:
73
+```sh
74
+yarn debug-test-build-devtools
75
+```
76
+
77
# Finding the right first issue
78
The React team maintains [this list of "good first issues"](https://github.com/facebook/react/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22Component%3A+Developer+Tools%22+label%3A%22good+first+issue%22) for anyone interested in contributing to DevTools. If you see one that interests you, leave a comment!
79