appandflow / appandflow/react-native-safe-area-context

Jest mock "TypeError: Cannot read properties of undefined (reading 'top')"

未關閉
#551 9 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
help wanted
主要語言
TypeScript
星號
2.8k
分支
258
平均合併
3 天 1 小時
30 天內合併 PR
2

描述

When upgrading from 4.13.0 to 4.13.1, start facing a TypeError due to a recent mock update https://github.com/th3rdwave/react-native-safe-area-context/pull/449

Following the guide, I included the `react-native-safe-area-context` to my transformIgnorePatterns

```
transformIgnorePatterns: [
"node_modules/(?!react-|@react-native-community|react-native-safe-area-context|victory|rn-placeholder|redux-persist|@react-navigation|@sentry/react-native|@react-native|mixpanel-react-native|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg|@notifee|stream-chat-expo|@rneui/base|@datadog/mobile-react-native/jest/mock).+\\.js$",
],
```

```
TypeError: Cannot read properties of undefined (reading 'top')

23 | }
24 | const Ui = ui as ReactElement;
> 25 | render(Ui, { wrapper });
```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。