Skip to content

Commit 0ab335f

Browse files
committedMay 8, 2023
docs: add note about SUPPRESS_JEST_WARNINGS to jest docs
1 parent eb28aaf commit 0ab335f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎docs/jest.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Jest is a JavaScript runtime developed by Facebook that is usually used for test
44
Because Jest is designed primarily for testing React applications, using it to test Node.js server-side applications comes with a lot of caveats.
55
We strongly recommend using a different testing framework, like [Mocha](https://mochajs.org/).
66

7+
To suppress any Jest warnings from Mongoose, set the `SUPPRESS_JEST_WARNINGS` environment variable:
8+
9+
```
10+
env SUPPRESS_JEST_WARNINGS=1 npm test
11+
```
12+
713
If you choose to delve into dangerous waters and test Mongoose apps with Jest, here's what you need to know:
814

915
<h2 id="recommended-testenvironment"><a href="#recommended-testenvironment">Recommended <code>testEnvironment</code></a></h2>

0 commit comments

Comments
 (0)
Please sign in to comment.