mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-31 17:53:50 +00:00
@@ -53,17 +53,19 @@ module.exports = {
|
|||||||
|
|
||||||
### Jest
|
### 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
|
```js
|
||||||
{
|
{
|
||||||
"preset": "react-native-web"
|
"moduleNameMapper": {
|
||||||
|
"^react-native$": "react-native-web"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Flow
|
### 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
|
```yml
|
||||||
[options]
|
[options]
|
||||||
|
|||||||
@@ -10,8 +10,6 @@
|
|||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
"jest",
|
|
||||||
"jest-preset.js",
|
|
||||||
"src",
|
"src",
|
||||||
"!**/__tests__"
|
"!**/__tests__"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user