From 2be582b6e07c68fb09ec61c2b25cfcf97e056caf Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Mon, 27 Jun 2022 10:19:28 -0700 Subject: [PATCH] Update docs for jest setup Fix #2312 --- packages/docs/src/pages/docs/getting-started/setup.md | 8 +++++--- packages/react-native-web/package.json | 2 -- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/docs/src/pages/docs/getting-started/setup.md b/packages/docs/src/pages/docs/getting-started/setup.md index b1975dbf..5a72ec46 100644 --- a/packages/docs/src/pages/docs/getting-started/setup.md +++ b/packages/docs/src/pages/docs/getting-started/setup.md @@ -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] diff --git a/packages/react-native-web/package.json b/packages/react-native-web/package.json index f415f301..d7f6a088 100644 --- a/packages/react-native-web/package.json +++ b/packages/react-native-web/package.json @@ -10,8 +10,6 @@ "sideEffects": false, "files": [ "dist", - "jest", - "jest-preset.js", "src", "!**/__tests__" ],