Skip to content

Commit c4ec1e1

Browse files
Update jest.md
1 parent d349f6b commit c4ec1e1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

recipes/javascript/tests/jest.md

+18
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,24 @@ $ npm install jest -D
5656
});
5757
});
5858
```
59+
- `.eslintrc.js` - If you use ESLint, add to the config.
60+
```javascript
61+
module.exports = {
62+
// ...
63+
64+
overrides: [
65+
{
66+
files: [
67+
"**/__tests__/*.{j,t}s?(x)",
68+
"**/tests/unit/**/*.spec.{j,t}s?(x)",
69+
],
70+
env: {
71+
jest: true,
72+
},
73+
},
74+
],
75+
}
76+
```
5977

6078
Then run as:
6179

0 commit comments

Comments
 (0)