We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7ad808 commit f2f7307Copy full SHA for f2f7307
recipes/javascript/tests/jest.md
@@ -3,10 +3,11 @@
3
4
See [Jest](https://jestjs.io/) homepage.
5
6
+Use the following pattern for placing naming your test scripts, so Jest can find them,.
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`.
10
-They can exist next to the script it is testing, or put all your tests in `__tests__`.
11
12
13
## Sample
0 commit comments