Update docs for jest setup

Fix #2312
This commit is contained in:
Nicolas Gallagher
2022-06-27 10:19:28 -07:00
parent c00b5e4192
commit 2be582b6e0
2 changed files with 5 additions and 5 deletions
@@ -53,17 +53,19 @@ module.exports = {
### Jest
[Jest](https://facebook.github.io/jest/) can be configured using the provided preset. This will map `react-native` to `react-native-web` and provide appropriate mocks. Please refer to the Jest documentation for more information.
[Jest](https://facebook.github.io/jest/) can be configured to understand the aliased module.
```js
{
"preset": "react-native-web"
"moduleNameMapper": {
"^react-native$": "react-native-web"
}
}
```
### Flow
[Flow](https://flow.org) can be configured to understand the aliased module
[Flow](https://flow.org) can be configured to understand the aliased module.
```yml
[options]
-2
View File
@@ -10,8 +10,6 @@
"sideEffects": false,
"files": [
"dist",
"jest",
"jest-preset.js",
"src",
"!**/__tests__"
],