You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrading from Expo SDK 51 to Expo SDK 52 causes expo-font's major version to move from 12 to 13. This causes a failure with the react-native-test-renderer's render method whenever expo-font's isLoaded method is called:
TypeError: loadedNativeFonts.forEach is not a function
3 |
4 | export default function App() {
> 5 | const robotoLoaded = isLoaded("Roboto");
| ^
6 | return (
7 | <View style={styles.container}>
8 | <Text>{robotoLoaded}</Text>
at forEach (node_modules/expo-font/src/memory.ts:21:23)
at isLoaded (node_modules/expo-font/src/Font.ts:27:24)
at App (App.js:5:32)
In particular, this impacts @expo/vector-icons rendering, including in react-native-paper, which has had an issue filed in that repo.
I'm not sure whether the fix to this needs to be made in expo-fonts or in react-native-testing-library, or elsewhere, but I'm starting here.
Expected behavior
Using @expo/vector-icons, which itself calls expo-font's isLoaded method, will not cause react-native-test-renderer's render method to fail with the above exception.
Steps to Reproduce
I've made a minimal reproduction. A simple npm install then npm test will demonstrate the issue.
Screenshots
This is purely a testing issue, no screenshots.
Versions
➜ react-native-testing-library-expo-icons-issue git:(master) npx envinfo --npmPackages react,react-native,react-test-renderer,@testing-library/react-native <region:us-west-2>
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
npmPackages:
@testing-library/react-native: ^12.8.1 => 12.9.0
react: 18.3.1 => 18.3.1
react-native: 0.76.3 => 0.76.3
react-test-renderer: ^18.3.1 => 18.3.1
The text was updated successfully, but these errors were encountered:
Describe the bug
Upgrading from Expo SDK 51 to Expo SDK 52 causes expo-font's major version to move from 12 to 13. This causes a failure with the react-native-test-renderer's
render
method whenever expo-font's isLoaded method is called:In particular, this impacts @expo/vector-icons rendering, including in react-native-paper, which has had an issue filed in that repo.
I'm not sure whether the fix to this needs to be made in expo-fonts or in react-native-testing-library, or elsewhere, but I'm starting here.
Expected behavior
Using @expo/vector-icons, which itself calls expo-font's
isLoaded
method, will not cause react-native-test-renderer'srender
method to fail with the above exception.Steps to Reproduce
I've made a minimal reproduction. A simple
npm install
thennpm test
will demonstrate the issue.Screenshots
This is purely a testing issue, no screenshots.
Versions
The text was updated successfully, but these errors were encountered: