仅为测试目标添加React的`RCTTest`子规范?

时间:2018-12-17 07:19:48

标签: react-native cocoapods podfile

我一直在尝试通过定义变量来清理我的pod文件

def rn_dependencies
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge',

    'ART',
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTActionSheet',
    'RCTAnimation',
    'RCTBlob',
    'RCTCameraRoll',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTText',
    'RCTPushNotification',
    'RCTSettings',
    'RCTNetwork',
    'RCTVibration',
    'RCTLinkingIOS',
    'RCTWebSocket', # Needed for debugging
  ]
  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
end
target 'RNApp' do
  rn_dependencies
end

target 'RNAppTest' do
    inherit! :search_paths
    rn_dependencies
end

我想将RCTTest添加到RNAppTest目标的React子规范中。有没有办法在测试目标内部修改React的子规格?或者,是否可以为数组定义变量?

0 个答案:

没有答案