Currently, React Native dynamically requires a file for the running platform with an specific file extension, *.ios.js or *.android.js. However, when running this code inside a test environment, we get a require error because the module require('./module') cannot be found in the file tree, which looks like:
module.ios.jsmodule.android.js
How can we handle this issues in a test environment?
Aucun commentaire:
Enregistrer un commentaire