react-native-navigation的迁移库

test-e2e.js 709B

12345678910111213141516171819202122
  1. const _ = require('lodash');
  2. const exec = require('shell-utils').exec;
  3. const android = _.includes(process.argv, '--android');
  4. const release = _.includes(process.argv, '--release');
  5. const skipBuild = _.includes(process.argv, '--skipBuild');
  6. run();
  7. function run() {
  8. const platform = android ? `android` : `ios`;
  9. const prefix = android ? `android.emu` : `ios.sim`;
  10. const suffix = release ? `release` : `debug`;
  11. const configuration = `${prefix}.${suffix}`;
  12. const cleanup = process.env.CI ? `--cleanup` : ``;
  13. if (!skipBuild) {
  14. exec.execSync(`detox build --configuration ${configuration}`);
  15. }
  16. exec.execSync(`detox test --configuration ${configuration} --platform ${platform} ${cleanup}`);
  17. }