File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
10
10
For a steady stream of TILs from a variety of rocketeers, checkout
11
11
[ til.hashrocket.com] ( https://til.hashrocket.com/ ) .
12
12
13
- _ 651 TILs and counting..._
13
+ _ 652 TILs and counting..._
14
14
15
15
---
16
16
@@ -461,6 +461,7 @@ _651 TILs and counting..._
461
461
- [ Quickly Search For A Component With React DevTools] ( react/quickly-search-for-a-component-with-react-devtools.md )
462
462
- [ Read Only Input Elements] ( react/read-only-input-elements.md )
463
463
- [ Rendering Multiple Nodes With Fragments] ( react/rendering-multiple-nodes-with-fragments.md )
464
+ - [ Test Files In create-react-app] ( react/test-files-in-create-react-app.md )
464
465
- [ Use A Ref To Autofocus An Input] ( react/use-a-ref-to-autofocus-an-input.md )
465
466
- [ Use withRouter To Pass Down React-Router History] ( react/use-withrouter-to-pass-down-react-router-history.md )
466
467
- [ Visually Select A React Element For Inspection] ( react/visually-select-a-react-element-for-inspection.md )
Original file line number Diff line number Diff line change
1
+ # Test Files In create-react-app
2
+
3
+ Any ` .js ` files placed in the ` __tests__ ` directory will be treated as tests
4
+ by Jest when running ` yarn test ` . If you don't want to place all of your
5
+ files in that directory and especially if you want to co-located your test
6
+ files with the source files, you can name them with the ` .test.js ` or
7
+ ` .spec.js ` suffixes.
8
+
9
+ Any files in your create-react-app project ending in these suffixes will be
10
+ treated by Jest as test files and included in test runs.
11
+
12
+ There are [ more
13
+ details] ( https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#running-tests )
14
+ in the docs.
You can’t perform that action at this time.
0 commit comments