You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feeling really dumb here. I can't find any information in the docs to describe how Jest finds tests, or where I should put all my test files, or what filename conventions to use. The Getting Started example uses sum.js and sum.test.js, does that mean I should write all my tests in files right beside the source file with the convention [filename].test.js? It would be nice if this were explicitly stated somewhere.
Searching through Google I also found that there's a __tests__ directory that can be used alternatively. Does Jest parse every JS file in __tests__ directories, or do I need to follow some naming convention? I can't find reference to __tests__ anywhere in the docs.
Can someone create a section in Getting Started to explain the different options here and the recommended approach?
I understand the docs may want to take an unopinionated stance, but for newcomers having some type of default will lower the barrier to adopting new technologies.
The text was updated successfully, but these errors were encountered:
├── __tests__
│ └── component.spec.js # test
│ └── anything # test
├── package.json # not test
├── foo.test.js # test
├── bar.spec.jsx # test
└── component.js # not test
I think it's a great opportunity for a first contribution. Feel free to send a PR we'd love to review and merge it!
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Feeling really dumb here. I can't find any information in the docs to describe how Jest finds tests, or where I should put all my test files, or what filename conventions to use. The Getting Started example uses
sum.js
andsum.test.js
, does that mean I should write all my tests in files right beside the source file with the convention[filename].test.js
? It would be nice if this were explicitly stated somewhere.Searching through Google I also found that there's a
__tests__
directory that can be used alternatively. Does Jest parse every JS file in__tests__
directories, or do I need to follow some naming convention? I can't find reference to__tests__
anywhere in the docs.Can someone create a section in Getting Started to explain the different options here and the recommended approach?
I understand the docs may want to take an unopinionated stance, but for newcomers having some type of default will lower the barrier to adopting new technologies.
The text was updated successfully, but these errors were encountered: