Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Your jest mock is breaking expo 52 and react-native 0.76 #369

Open
retyui opened this issue Nov 18, 2024 · 0 comments · May be fixed by #370
Open

[Bug] Your jest mock is breaking expo 52 and react-native 0.76 #369

retyui opened this issue Nov 18, 2024 · 0 comments · May be fixed by #370

Comments

@retyui
Copy link
Contributor

retyui commented Nov 18, 2024

This masterpiece have to be removed for RN 0.76

if (!global.__turboModuleProxy) {
global.__turboModuleProxy = name => {
return {};
};
}

To reproduce:

  1. Apply there steps from Readme: https://github.com/ammarahm-ed/react-native-mmkv-storage/tree/master/jest
  2. Create a simple test file
import {StyleSheet} from 'react-native';
test('test',() => {
  StyleSheet.create({a: {color:'red'}})
  // ^^^ TypeError: NativeModule.getConstants is not a function
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant