Skip to content

Commit f2f7307

Browse files
Update jest.md
1 parent a7ad808 commit f2f7307

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

recipes/javascript/tests/jest.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
44
See [Jest](https://jestjs.io/) homepage.
55

6+
Use the following pattern for placing naming your test scripts, so Jest can find them,.
67

7-
Test scripts should be named `*.spec.js`. You can also use `.jsx`, `.ts` or `.tsx` for the extension.
8+
- Scripts `tests/unit` that end in `.spec.(js|jsx|ts|tsx)`. e.g. `src/tests/unit/foo.spec.js`.
9+
- Any js(x)/ts(x) files inside `__tests__` directories. e.g. `src/__tests__/foo.test.js`.
810

9-
They can exist next to the script it is testing, or put all your tests in `__tests__`.
1011

1112

1213
## Sample

0 commit comments

Comments
 (0)