问题描述
我正在进行排毒测试,并且匹配默认为ios,并且我想在android中进行测试,因此无法将其更改为android.帮帮我
I am doing Detox testing and matching takes default as ios and I want to test in android, I am not able to change it to android. help me
推荐答案
Detox未运行iOS测试.看起来只是这样,因为正则表达式中的负向超前.
Detox isn't running an iOS test. It only looks like that because of the negative lookahead in the regex.
```--testNamePattern ='^((?!:ios:).)* $'`
```--testNamePattern='^((?!:ios:).)*$'`
更新为评论
当前react-native:0.57.8
中存在一个导致以下错误的问题:
Currently there is an issue in react-native:0.57.8
that is causing the the following error:
Error: Couldn't find preset "module:metro-react-native-babel-preset"
当前有一种解决方法,可以在这里找到 https://github.com/facebook/react-native/issues/21241#issuecomment-431464191
There is currently a workaround that can be found here https://github.com/facebook/react-native/issues/21241#issuecomment-431464191
使用以下内容创建babel.config.js(基本上等同于股票.babelrc)
Create babel.config.js with the following content (basically equivalent to stock .babelrc)
module.exports = function (api) {
api.cache(true)
return {
presets: ['module:metro-react-native-babel-preset']
}
}
步骤2
删除.babelrc
Step 2
Remove .babelrc
运行yarn add --dev babel-jest babel-core@^7.0.0-bridge.0 @ babel/core
Run yarn add --dev babel-jest babel-core@^7.0.0-bridge.0 @babel/core
我个人不需要执行步骤3.
Personally I haven't needed to do step 3.
这篇关于运行与/e2e/i匹配的所有测试套件以及与"^((?!:ios:).)* $"匹配的测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!