Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Rewire throwing an error in react-native written in typescript

$
0
0

I am trying to write unit test for a non exported function using rewire in react-native , but it starts showing below mentioned error as soon as I do the setup for rewire and run test for that file

ReferenceError: /Users/tushar/Desktop/wealthO2_clone/WealthO2.ClientPortal.MobileApp/node_modules/react-native/jest/setup.js: The module factory of jest.mock() is not allowed to reference any out-of-scope variables.Invalid variable access: get_Allowed objects: Array, ArrayBuffer, Atomics, BigInt, BigInt64Array, BigUint64Array, Boolean, Buffer, DataView, Date, Error, EvalError, FinalizationRegistry, Float32Array etc

FYI the project is in typescript


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>