react-native-navigation的迁移库

test-e2e.js 624B

12345678910111213141516171819
  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. run();
  6. function run() {
  7. const platform = android ? `android` : `ios`;
  8. const prefix = android ? `android.emu` : `ios.sim`;
  9. const suffix = release ? `release` : `debug`;
  10. const configuration = `${prefix}.${suffix}`;
  11. const cleanup = process.env.CI ? `--cleanup` : ``;
  12. exec.execSync(`detox build --configuration ${configuration}`);
  13. exec.execSync(`detox test --configuration ${configuration} --platform ${platform} ${cleanup}`);
  14. }