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
When I run Jest test suites, I got this error, due to usage under the hood of react-native-nitro-modules:
Failed to get NitroModules: The native "NitroModules" Turbo/Native-Module could not be found.
* Make sure react-native-nitro-modules/NitroModules is correctly autolinked (run `npx react-native config` to verify)
* Make sure you enabled the new architecture (TurboModules) and CodeGen properly generated the "NativeNitroModules"/NitroModules specs. See https://github.com/reactwg/react-native-new-architecture/blob/main/docs/enable-apps.md
* Make sure you are using react-native 0.75.0 or higher.
* Make sure you rebuilt the app.
* Make sure you ran `expo prebuild`.
* Make sure you ran `pod install` in the ios/ directory.
Is there any Jest preset to use, I haven't find any in this repo/docs or on react-native-nitro-modules
Steps to Reproduce
Create an Expo project
Install and configure react-native-unistyles@beta
Run yarn expo prebuild --clean
Run any test suites with Jest that contains JSX
Snack or Repository Link (Optional)
No response
Unistyles Version
3.0.0-beta.1
React Native Version
0.76.3
Platforms
Android, iOS, Web
Expo
Yes
The text was updated successfully, but these errors were encountered:
I don't think there is any. It's also too early for me to invest time in preparing such an example.
I will definitely do it later during the RC phase. Keeping this issue for future reference.
@jpudysz Any suggestions on getting Jest tests configured with the new Unistyles? I am so close 🤏 to upgrading my project to the new arch, and this is the final blocker that I know of.
// jest.setup.jsimport'./unistyles';// <-- File that initializes Unistyles
// __mocks__/react-native-unistyles.js// You'll want to edit this mock to fit your use caselettheme;module.exports={UnistylesRuntime: {hasAdaptiveThemes: false,setTheme: (newTheme)=>{theme=newTheme;},},StyleSheet: {configure: (config)=>{theme=config.themes.light;},create: (styles)=>{if(typeofstyles==='function'){returnstyles(theme);}returnstyles;},},};
Description
When I run Jest test suites, I got this error, due to usage under the hood of
react-native-nitro-modules
:Is there any Jest preset to use, I haven't find any in this repo/docs or on react-native-nitro-modules
Steps to Reproduce
react-native-unistyles@beta
yarn expo prebuild --clean
Snack or Repository Link (Optional)
No response
Unistyles Version
3.0.0-beta.1
React Native Version
0.76.3
Platforms
Android, iOS, Web
Expo
Yes
The text was updated successfully, but these errors were encountered: