Recibo el siguiente error en una prueba con broma:
TypeError: no se puede leer la propiedad 'agregar' de indefinido
● No se pudo ejecutar el conjunto de pruebas
TypeError: Cannot read properties of undefined (reading 'add') at Object.<anonymous> (node_modules/@react-navigation/stack/lib/commonjs/utils/conditional.tsx:3:9) at Object.<anonymous> (node_modules/@react-navigation/stack/lib/commonjs/TransitionConfigs/CardStyleInterpolators.tsx:7:1)Me estoy burlando del navegador así:
interface IProps { component: any, params?: any, type: 'stack' | 'tab' } const Stack = createStackNavigator(); const TabsNav = createBottomTabNavigator(); const MockedNavigator = ({ component, type, params = {} }: IProps) => { return ( <Provider store={store}> <NavigationContainer> { type === 'stack' ? ( <Stack.Navigator> <Stack.Screen name="MockedScreen" component={ component } initialParams={ params } /> </Stack.Navigator> ) : ( <TabsNav.Navigator initialRouteName="HomeScreen" > <TabsNav.Screen name="MockedScreen" component={ component } initialParams={ params } /> </TabsNav.Navigator> )} </NavigationContainer> <FlashMessage position="top" testID="flash-message"/> </Provider> ); }; export default MockedNavigator;"reaccionar nativo": "0.69.1",
"@react-navegación/nativo": "^6.0.11",
"@react-navegación/pila": "^6.2.2",
"babel-jest": "^26.6.3",
"broma": "^26.6.3",
"reaccionar-prueba-procesador": "18.0.0",
"@testing-library/jest-native": "^4.0.5",
"@testing-library/react-native": "^10.1.1",
Agradezco cualquier ayuda con este problema.