From 56d8af814d7ce4fb3a4097dd977997cf75173fee Mon Sep 17 00:00:00 2001 From: Youssouf EL AZIZI Date: Sun, 30 Apr 2023 21:02:58 +0100 Subject: [PATCH 1/2] Add config example for pnpm While using `pnpm` as package manger `transformIgnorePatterns` should refernce to package inside `.pnpm` folder. [source](https://jestjs.io/docs/configuration#transformignorepatterns-arraystring) --- website/docs/ReactNavigation.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/ReactNavigation.md b/website/docs/ReactNavigation.md index c685c3bcc..b34d92b2f 100644 --- a/website/docs/ReactNavigation.md +++ b/website/docs/ReactNavigation.md @@ -140,6 +140,8 @@ module.exports = { setupFiles: ['./node_modules/react-native-gesture-handler/jestSetup.js'], transformIgnorePatterns: [ 'node_modules/(?!(jest-)?@?react-native|@react-native-community|@react-navigation)', + // In case you are using pnpm as package manager, use this: + // 'node_modules/(?!(?:.pnpm/)?((jest-)?@?react-native|@react-native-community|@react-navigation))', ], }; ``` From 1f9929aee0dc016149ed33e53d9de45df2924ea7 Mon Sep 17 00:00:00 2001 From: Maciej Jastrzebski Date: Tue, 2 May 2023 12:29:19 +0200 Subject: [PATCH 2/2] Update website/docs/ReactNavigation.md --- website/docs/ReactNavigation.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/docs/ReactNavigation.md b/website/docs/ReactNavigation.md index b34d92b2f..d27c80736 100644 --- a/website/docs/ReactNavigation.md +++ b/website/docs/ReactNavigation.md @@ -140,7 +140,8 @@ module.exports = { setupFiles: ['./node_modules/react-native-gesture-handler/jestSetup.js'], transformIgnorePatterns: [ 'node_modules/(?!(jest-)?@?react-native|@react-native-community|@react-navigation)', - // In case you are using pnpm as package manager, use this: + + // For pnpm you need to use inlcude `(?!(?:.pnpm/)?` part like this: // 'node_modules/(?!(?:.pnpm/)?((jest-)?@?react-native|@react-native-community|@react-navigation))', ], };