Please can somebody tell me how the mock files for react native detox tests ? I following this article
I am using react-native version 0.57.7 and detox 9.1.2
I created rn-cli.config.js in root directory
const defaultSourceExts = require('metro-config/src/defaults/defaults').sourceExts
module.exports = {
resolver: {
sourceExts: process.env.RN_SRC_EXT
? process.env.RN_SRC_EXT.split(',').concat(defaultSourceExts)
: defaultSourceExts
}
};
I created mock files right next to production files with e2e extension
then i run Metro with command (i am using windows powershel 6)
$env:RN_SRC_EXT="e2e.ts";react-native start
react-native run-android
and NOTHING, literally nothing is changed/mocked
I also tried build and run detox
cd android;$env:ENVFILE="../config/default/env";gradle assembleDebug assembleAndroidTest -DtestBuildType=debug;cd ..
detox test -c android.emu.debug.win
but also nothing happend, i removed all node_modules, android build folder but no effect.
Did i miss something ?