react-native-navigation的迁移库

test.unit.ios.js 785B

12345678910111213141516171819202122232425262728
  1. const exec = require('shell-utils').exec;
  2. function runWithXcpretty(cmd) {
  3. if (exec.which(`xcpretty`)) {
  4. exec.execSync(`${cmd} | xcpretty && exit \${PIPESTATUS[0]}`);
  5. } else {
  6. exec.execSync(`${cmd}`);
  7. }
  8. }
  9. function run() {
  10. runWithXcpretty(`RCT_NO_LAUNCH_PACKAGER=true
  11. cd ./playground/ios && xcodebuild
  12. build build-for-testing
  13. -scheme "playground"
  14. -project playground.xcodeproj
  15. -sdk iphonesimulator
  16. -configuration Debug`);
  17. runWithXcpretty(`RCT_NO_LAUNCH_PACKAGER=true
  18. cd ./playground/ios && xcodebuild
  19. test-without-building
  20. -scheme "playground"
  21. -project playground.xcodeproj
  22. -destination 'platform=iOS Simulator,name=iPhone 7'`);
  23. }
  24. run();