expo-test-runner 0.0.3 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ # The MIT License (MIT)
2
+
3
+ Copyright (c) 2019-present 650 Industries, Inc. (aka Expo)
4
+
5
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ > of this software and associated documentation files (the "Software"), to deal
7
+ > in the Software without restriction, including without limitation the rights
8
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ > copies of the Software, and to permit persons to whom the Software is
10
+ > furnished to do so, subject to the following conditions:
11
+ >
12
+ > The above copyright notice and this permission notice shall be included in
13
+ > all copies or substantial portions of the Software.
14
+ >
15
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ > THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,16 @@
1
+ <div align="center">
2
+ <h1>expo-test-runner</h1>
3
+ <p></p>
4
+ <p>Script that enchants your test experience!</p>
5
+ <sup>
6
+ <a href="https://www.npmjs.com/package/expo-test-runner">
7
+ <img src="https://img.shields.io/npm/v/expo-test-runner?style=flat-square" alt="releases" />
8
+ </a>
9
+ <a href="https://github.com/expo/expo-test-runner/blob/main/LICENSE.md">
10
+ <img src="https://img.shields.io/github/license/expo/expo-test-runner?style=flat-square" alt="license" />
11
+ </a>
12
+ </sup>
13
+ <br />
14
+
15
+ <br />
16
+ </div>
File without changes
package/build/Utils.d.ts CHANGED
@@ -1,2 +1,6 @@
1
+ import { Platform } from './Platform';
1
2
  export declare function yarnInstall(path: string): void;
2
3
  export declare const delay: (ms: number) => Promise<void>;
4
+ export declare function killEmulatorAsync(): Promise<void>;
5
+ export declare function killSimulatorAsync(): Promise<void>;
6
+ export declare function killVirtualDevicesAsync(platform: Platform): Promise<void>;
package/build/Utils.js CHANGED
@@ -1,11 +1,49 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.delay = exports.yarnInstall = void 0;
6
+ exports.killVirtualDevicesAsync = exports.killSimulatorAsync = exports.killEmulatorAsync = exports.delay = exports.yarnInstall = void 0;
7
+ const spawn_async_1 = __importDefault(require("@expo/spawn-async"));
4
8
  const child_process_1 = require("child_process");
9
+ const Platform_1 = require("./Platform");
5
10
  function yarnInstall(path) {
6
11
  child_process_1.spawnSync('yarn', ['install', '--silent'], { stdio: 'inherit', cwd: path });
7
12
  }
8
13
  exports.yarnInstall = yarnInstall;
9
14
  const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
10
15
  exports.delay = delay;
16
+ async function killEmulatorAsync() {
17
+ try {
18
+ console.log('Trying to kill emulator...');
19
+ await spawn_async_1.default('adb', ['-s', 'emulator-5554', 'emu', 'kill'], { stdio: 'inherit' });
20
+ console.log('Emulator was killed.');
21
+ }
22
+ catch (e) {
23
+ console.log("Couldn't kill emulator");
24
+ console.log(e);
25
+ }
26
+ }
27
+ exports.killEmulatorAsync = killEmulatorAsync;
28
+ async function killSimulatorAsync() {
29
+ try {
30
+ console.log('Trying to kill simulator...');
31
+ await spawn_async_1.default('xcrun', ['simctl', 'shutdown', 'all'], { stdio: 'inherit' });
32
+ console.log('Simulator was killed.');
33
+ }
34
+ catch (e) {
35
+ console.log("Couldn't kill simulator.");
36
+ console.log(e);
37
+ }
38
+ }
39
+ exports.killSimulatorAsync = killSimulatorAsync;
40
+ async function killVirtualDevicesAsync(platform) {
41
+ if ((platform & Platform_1.Platform.Android) > 0) {
42
+ await killEmulatorAsync();
43
+ }
44
+ if ((platform & Platform_1.Platform.iOS) > 0) {
45
+ await killSimulatorAsync();
46
+ }
47
+ }
48
+ exports.killVirtualDevicesAsync = killVirtualDevicesAsync;
11
49
  //# sourceMappingURL=Utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../src/Utils.ts"],"names":[],"mappings":";;;AAAA,iDAA0C;AAE1C,SAAgB,WAAW,CAAC,IAAY;IACtC,yBAAS,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9E,CAAC;AAFD,kCAEC;AAEM,MAAM,KAAK,GAAkC,EAAE,CAAC,EAAE,CACvD,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AADrC,QAAA,KAAK,SACgC","sourcesContent":["import { spawnSync } from 'child_process';\n\nexport function yarnInstall(path: string) {\n spawnSync('yarn', ['install', '--silent'], { stdio: 'inherit', cwd: path });\n}\n\nexport const delay: (ms: number) => Promise<void> = ms =>\n new Promise(resolve => setTimeout(resolve, ms));\n"]}
1
+ {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../src/Utils.ts"],"names":[],"mappings":";;;;;;AAAA,oEAA2C;AAC3C,iDAA0C;AAE1C,yCAAsC;AAEtC,SAAgB,WAAW,CAAC,IAAY;IACtC,yBAAS,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9E,CAAC;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CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACjC,MAAM,kBAAkB,EAAE,CAAC;KAC5B;AACH,CAAC;AARD,0DAQC","sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport { spawnSync } from 'child_process';\n\nimport { Platform } from './Platform';\n\nexport function yarnInstall(path: string) {\n spawnSync('yarn', ['install', '--silent'], { stdio: 'inherit', cwd: path });\n}\n\nexport const delay: (ms: number) => Promise<void> = ms =>\n new Promise(resolve => setTimeout(resolve, ms));\n\nexport async function killEmulatorAsync(): Promise<void> {\n try {\n console.log('Trying to kill emulator...');\n await spawnAsync('adb', ['-s', 'emulator-5554', 'emu', 'kill'], { stdio: 'inherit' });\n console.log('Emulator was killed.');\n } catch (e) {\n console.log(\"Couldn't kill emulator\");\n console.log(e);\n }\n}\n\nexport async function killSimulatorAsync(): Promise<void> {\n try {\n console.log('Trying to kill simulator...');\n await spawnAsync('xcrun', ['simctl', 'shutdown', 'all'], { stdio: 'inherit' });\n console.log('Simulator was killed.');\n } catch (e) {\n console.log(\"Couldn't kill simulator.\");\n console.log(e);\n }\n}\n\nexport async function killVirtualDevicesAsync(platform: Platform): Promise<void> {\n if ((platform & Platform.Android) > 0) {\n await killEmulatorAsync();\n }\n\n if ((platform & Platform.iOS) > 0) {\n await killSimulatorAsync();\n }\n}\n"]}
@@ -7,6 +7,7 @@ const spawn_async_1 = __importDefault(require("@expo/spawn-async"));
7
7
  const BundlerController_1 = __importDefault(require("../BundlerController"));
8
8
  const Platform_1 = require("../Platform");
9
9
  const TemplateFile_1 = require("../TemplateFile");
10
+ const Utils_1 = require("../Utils");
10
11
  const PresetTemplate_1 = __importDefault(require("./PresetTemplate"));
11
12
  class DetoxPreset extends PresetTemplate_1.default {
12
13
  getDependencies() {
@@ -14,7 +15,7 @@ class DetoxPreset extends PresetTemplate_1.default {
14
15
  ...super.getDependencies(),
15
16
  {
16
17
  name: 'detox',
17
- path: '18.20.1',
18
+ path: '19.1.0',
18
19
  },
19
20
  ];
20
21
  }
@@ -70,10 +71,11 @@ class DetoxPreset extends PresetTemplate_1.default {
70
71
  await bundler.start();
71
72
  }
72
73
  for (const conf of test.configurations) {
73
- await spawn_async_1.default('yarn', ['detox', 'test', '-c', conf, '--ci'], {
74
+ await spawn_async_1.default('yarn', ['detox', 'test', '-c', conf, '--ci', '--headless', '--gpu', 'swiftshader_indirect'], {
74
75
  cwd: projectPath,
75
76
  stdio: 'inherit',
76
77
  });
78
+ await Utils_1.killVirtualDevicesAsync(this.platform);
77
79
  }
78
80
  }
79
81
  finally {
@@ -1 +1 @@
1
- {"version":3,"file":"DetoxTemplate.js","sourceRoot":"","sources":["../../src/presets/DetoxTemplate.ts"],"names":[],"mappings":";;;;;AAAA,oEAA2C;AAG3C,6EAAqD;AAErD,0CAAuC;AACvC,kDAA8E;AAC9E,sEAA8C;AAE9C,MAAqB,WAAY,SAAQ,wBAAc;IAC5C,eAAe;QACtB,OAAO;YACL,GAAG,KAAK,CAAC,eAAe,EAAE;YAC1B;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,SAAS;aAChB;SACF,CAAC;IACJ,CAAC;IAEQ,kBAAkB;QACzB,OAAO;YACL,GAAG,KAAK,CAAC,kBAAkB,EAAE;YAC7B;gBACE,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,kBAAkB;aACrC;SACF,CAAC;IACJ,CAAC;IAEQ,cAAc;QACrB,OAAO;YACL,GAAG,KAAK,CAAC,cAAc,EAAE;YACzB,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa;SACzC,CAAC;IACJ,CAAC;IACQ,gBAAgB;;QACvB,MAAM,GAAG,GAAG,IAAI,mCAAoB,CAAC,OAAO,CAAC,CAAC;QAE9C,MAAM,eAAe,GAAoC,MAAA,IAAI,CAAC,MAAM,CAAC,eAAe,0CAAE,MAAM,CAC1F,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YAClB,GAAG,OA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AE7C,IAAI,IAAI,CAAC,gBAAgB,EAAE;gBACzB,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;aACvB;YAED,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,EAAE;gBACtC,MAAM,qBAAU,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE;oBAC9D,GAAG,EAAE,WAAW;oBAChB,KAAK,EAAE,SAAS;iBACjB,CAAC,CAAC;aACJ;SACF;gBAAS;YACR,qCAAqC;YACrC,MAAM,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,EAAE,CAAA,CAAC;SACvB;IACH,CAAC;CACF;AAnFD,8BAmFC","sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport { Definitions } from 'dot';\n\nimport BundlerController from '../BundlerController';\nimport { Dependency, DetoxTest } from '../Config';\nimport { Platform } from '../Platform';\nimport { ProjectFile, TemplateFilesFactory, UserFile } from '../TemplateFile';\nimport PresetTemplate from './PresetTemplate';\n\nexport default class DetoxPreset extends PresetTemplate {\n override getDependencies(): Dependency[] {\n return [\n ...super.getDependencies(),\n {\n name: 'detox',\n path: '18.20.1',\n },\n ];\n }\n\n override getDevDependencies(): Dependency[] {\n return [\n ...super.getDevDependencies(),\n {\n name: '@types/react-native',\n path: this.config.reactNativeVersion,\n },\n ];\n }\n\n override getDefinitions(): Definitions {\n return {\n ...super.getDefinitions(),\n appEntryPoint: this.config.appEntryPoint,\n };\n }\n override getTemplateFiles(): { [path: string]: ProjectFile } {\n const tff = new TemplateFilesFactory('detox');\n\n const additionalFiles: { [path: string]: ProjectFile } = this.config.additionalFiles?.reduce(\n (reducer, file) => ({\n ...reducer,\n [file]: new UserFile(this.userFilePath(file)),\n }),\n {}\n );\n\n if (this.config.android?.detoxTestFile) {\n additionalFiles['android/app/src/androidTest/java/com/testrunner/DetoxTest.java'] =\n new UserFile(this.userFilePath(this.config.android.detoxTestFile), Platform.Android);\n }\n\n return {\n ...super.getTemplateFiles(),\n 'android/build.gradle': tff.androidFile(),\n 'android/app/build.gradle': tff.androidFile(),\n 'android/app/src/androidTest/java/com/testrunner/DetoxTest.java': tff.androidFile(),\n 'index.js': tff.file(true),\n [this.config.detoxConfigFile]: new UserFile(this.userFilePath(this.config.detoxConfigFile)),\n ...additionalFiles,\n };\n }\n\n override async build(projectPath: string, test: DetoxTest): Promise<void> {\n for (const conf of test.configurations) {\n await spawnAsync('yarn', ['detox', 'build', '-c', conf], {\n cwd: projectPath,\n stdio: 'inherit',\n });\n }\n }\n\n override async run(projectPath: string, test: DetoxTest): Promise<void> {\n let bundler: BundlerController | undefined;\n try {\n bundler = new BundlerController(projectPath);\n\n if (test.shouldRunBundler) {\n await bundler.start();\n }\n\n for (const conf of test.configurations) {\n await spawnAsync('yarn', ['detox', 'test', '-c', conf, '--ci'], {\n cwd: projectPath,\n stdio: 'inherit',\n });\n }\n } finally {\n // If bundler wasn't started is noop.\n await bundler?.stop();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"DetoxTemplate.js","sourceRoot":"","sources":["../../src/presets/DetoxTemplate.ts"],"names":[],"mappings":";;;;;AAAA,oEAA2C;AAG3C,6EAAqD;AAErD,0CAAuC;AACvC,kDAA8E;AAC9E,oCAAmD;AACnD,sEAA8C;AAE9C,MAAqB,WAAY,SAAQ,wBAAc;IAC5C,eAAe;QACtB,OAAO;YACL,GAAG,KAAK,CAAC,eAAe,EAAE;YAC1B;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;aACf;SACF,CAAC;IACJ,CAAC;IAEQ,kBAAkB;QACzB,OAAO;YACL,GAAG,KAAK,CAAC,kBAAkB,EAAE;YAC7B;gBACE,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,kBAAkB;aACrC;SACF,CAAC;IACJ,CAAC;IAEQ,cAAc;QACrB,OAAO;YACL,GAAG,KAAK,CAAC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CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE;gBACvD,GAAG,EAAE,WAAW;gBAChB,KAAK,EAAE,SAAS;aACjB,CAAC,CAAC;SACJ;IACH,CAAC;IAEQ,KAAK,CAAC,GAAG,CAAC,WAAmB,EAAE,IAAe;QACrD,IAAI,OAAsC,CAAC;QAC3C,IAAI;YACF,OAAO,GAAG,IAAI,2BAAiB,CAAC,WAAW,CAAC,CAAC;YAE7C,IAAI,IAAI,CAAC,gBAAgB,EAAE;gBACzB,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;aACvB;YAED,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,EAAE;gBACtC,MAAM,qBAAU,CACd,MAAM,EACN,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,sBAAsB,CAAC,EACpF;oBACE,GAAG,EAAE,WAAW;oBAChB,KAAK,EAAE,SAAS;iBACjB,CACF,CAAC;gBAEF,MAAM,+BAAuB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC9C;SACF;gBAAS;YACR,qCAAqC;YACrC,MAAM,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,EAAE,CAAA,CAAC;SACvB;IACH,CAAC;CACF;AAzFD,8BAyFC","sourcesContent":["import spawnAsync from '@expo/spawn-async';\nimport { Definitions } from 'dot';\n\nimport BundlerController from '../BundlerController';\nimport { Dependency, DetoxTest } from '../Config';\nimport { Platform } from '../Platform';\nimport { ProjectFile, TemplateFilesFactory, UserFile } from '../TemplateFile';\nimport { killVirtualDevicesAsync } from '../Utils';\nimport PresetTemplate from './PresetTemplate';\n\nexport default class DetoxPreset extends PresetTemplate {\n override getDependencies(): Dependency[] {\n return [\n ...super.getDependencies(),\n {\n name: 'detox',\n path: '19.1.0',\n },\n ];\n }\n\n override getDevDependencies(): Dependency[] {\n return [\n ...super.getDevDependencies(),\n {\n name: '@types/react-native',\n path: this.config.reactNativeVersion,\n },\n ];\n }\n\n override getDefinitions(): Definitions {\n return {\n ...super.getDefinitions(),\n appEntryPoint: this.config.appEntryPoint,\n };\n }\n override getTemplateFiles(): { [path: string]: ProjectFile } {\n const tff = new TemplateFilesFactory('detox');\n\n const additionalFiles: { [path: string]: ProjectFile } = this.config.additionalFiles?.reduce(\n (reducer, file) => ({\n ...reducer,\n [file]: new UserFile(this.userFilePath(file)),\n }),\n {}\n );\n\n if (this.config.android?.detoxTestFile) {\n additionalFiles['android/app/src/androidTest/java/com/testrunner/DetoxTest.java'] =\n new UserFile(this.userFilePath(this.config.android.detoxTestFile), Platform.Android);\n }\n\n return {\n ...super.getTemplateFiles(),\n 'android/build.gradle': tff.androidFile(),\n 'android/app/build.gradle': tff.androidFile(),\n 'android/app/src/androidTest/java/com/testrunner/DetoxTest.java': tff.androidFile(),\n 'index.js': tff.file(true),\n [this.config.detoxConfigFile]: new UserFile(this.userFilePath(this.config.detoxConfigFile)),\n ...additionalFiles,\n };\n }\n\n override async build(projectPath: string, test: DetoxTest): Promise<void> {\n for (const conf of test.configurations) {\n await spawnAsync('yarn', ['detox', 'build', '-c', conf], {\n cwd: projectPath,\n stdio: 'inherit',\n });\n }\n }\n\n override async run(projectPath: string, test: DetoxTest): Promise<void> {\n let bundler: BundlerController | undefined;\n try {\n bundler = new BundlerController(projectPath);\n\n if (test.shouldRunBundler) {\n await bundler.start();\n }\n\n for (const conf of test.configurations) {\n await spawnAsync(\n 'yarn',\n ['detox', 'test', '-c', conf, '--ci', '--headless', '--gpu', 'swiftshader_indirect'],\n {\n cwd: projectPath,\n stdio: 'inherit',\n }\n );\n\n await killVirtualDevicesAsync(this.platform);\n }\n } finally {\n // If bundler wasn't started is noop.\n await bundler?.stop();\n }\n }\n}\n"]}
@@ -7,4 +7,4 @@ export interface DefaultOptions {
7
7
  path: string;
8
8
  shouldBeCleaned: boolean;
9
9
  }
10
- export declare function registerCommand<OptionsType extends DefaultOptions>(commander: CommanderStatic, commandName: string, fn: (config: Config, options: OptionsType) => any): import("commander").Command;
10
+ export declare function registerCommand<OptionsType extends DefaultOptions>(commander: CommanderStatic, commandName: string, fn: (config: Config, options: OptionsType) => Promise<any>): import("commander").Command;
@@ -58,7 +58,13 @@ function registerCommand(commander, commandName, fn) {
58
58
  providedOptions.configFile = ConfigReader_1.default.getFilePath(providedOptions.configFile);
59
59
  const options = providedOptions;
60
60
  const configReader = new ConfigReader_1.default(options.configFile);
61
- fn(configReader.readConfigFile(), options);
61
+ try {
62
+ await fn(configReader.readConfigFile(), options);
63
+ }
64
+ catch (e) {
65
+ console.error(e);
66
+ process.exit(1);
67
+ }
62
68
  });
63
69
  }
64
70
  exports.registerCommand = registerCommand;
@@ -1 +1 @@
1
- {"version":3,"file":"registerCommand.js","sourceRoot":"","sources":["../src/registerCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAA+B;AAG/B,kEAA0C;AAC1C,yCAAsC;AAStC,SAAS,WAAW,CAAC,QAAgB;IACnC,IAAI,QAAQ,KAAK,SAAS,EAAE;QAC1B,OAAO,mBAAQ,CAAC,OAAO,CAAC;KACzB;SAAM,IAAI,QAAQ,KAAK,KAAK,EAAE;QAC7B,OAAO,mBAAQ,CAAC,GAAG,CAAC;KACrB;SAAM,IAAI,QAAQ,KAAK,MAAM,EAAE;QAC9B,OAAO,mBAAQ,CAAC,IAAI,CAAC;KACtB;IAED,MAAM,IAAI,KAAK,CAAC,qBAAqB,QAAQ,EAAE,CAAC,CAAC;AACnD,CAAC;AAED,SAAgB,eAAe,CAC7B,SAA0B,EAC1B,WAAmB,EACnB,EAAiD;IAEjD,OAAO,SAAS;SACb,OAAO,CAAC,WAAW,CAAC;SACpB,MAAM,CAAC,qBAAqB,EAAE,0BAA0B,CAAC;SACzD,MAAM,CACL,uBAAuB,EACvB,gGAAgG,CACjG;SACA,MAAM,CAAC,qBAAqB,EAAE,8CAA8C,CAAC;SAC7E,MAAM,CAAC,KAAK,EAAC,eAAe,EAAC,EAAE;;QAC9B,IAAI,eAAe,CAAC,QAAQ,EAAE;YAC5B,eAAe,CAAC,QAAQ,GAAG,WAAW,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;SAClE;aAAM;YACL,eAAe,CAAC,QAAQ,GAAG,mBAAQ,CAAC,IAAI,CAAC;SAC1C;QAED,iDAAiD;QACjD,eAAe,CAAC,eAAe,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC;QACxD,eAAe,CAAC,IAAI,GAAG,MAAA,eAAe,CAAC,IAAI,mCAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QAEjE,eAAe,CAAC,UAAU,GAAG,sBAAY,CAAC,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAElF,MAAM,OAAO,GAAG,eAA8B,CAAC;QAC/C,MAAM,YAAY,GAAG,IAAI,sBAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC1D,EAAE,CAAC,YAAY,CAAC,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACP,CAAC;AA9BD,0CA8BC","sourcesContent":["import { CommanderStatic } from 'commander';\nimport * as tempy from 'tempy';\n\nimport { Config } from './Config';\nimport ConfigReader from './ConfigReader';\nimport { Platform } from './Platform';\n\nexport interface DefaultOptions {\n configFile: string;\n platform: Platform;\n path: string;\n shouldBeCleaned: boolean;\n}\n\nfunction mapPlatform(platform: string): Platform {\n if (platform === 'android') {\n return Platform.Android;\n } else if (platform === 'ios') {\n return Platform.iOS;\n } else if (platform === 'both') {\n return Platform.Both;\n }\n\n throw new Error(`Unknown platform: ${platform}`);\n}\n\nexport function registerCommand<OptionsType extends DefaultOptions>(\n commander: CommanderStatic,\n commandName: string,\n fn: (config: Config, options: OptionsType) => any\n) {\n return commander\n .command(commandName)\n .option('-c, --config <path>', 'Path to the config file.')\n .option(\n '--platform <platform>',\n 'Platform for which the project should be created. Available options: `ios`, `android`, `both`.'\n )\n .option('-p, --path <string>', 'Location where the test app will be created.')\n .action(async providedOptions => {\n if (providedOptions.platform) {\n providedOptions.platform = mapPlatform(providedOptions.platform);\n } else {\n providedOptions.platform = Platform.Both;\n }\n\n // clean temp folder if the path wasn't provided.\n providedOptions.shouldBeCleaned = !providedOptions.path;\n providedOptions.path = providedOptions.path ?? tempy.directory();\n\n providedOptions.configFile = ConfigReader.getFilePath(providedOptions.configFile);\n\n const options = providedOptions as OptionsType;\n const configReader = new ConfigReader(options.configFile);\n fn(configReader.readConfigFile(), options);\n });\n}\n"]}
1
+ {"version":3,"file":"registerCommand.js","sourceRoot":"","sources":["../src/registerCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAA+B;AAG/B,kEAA0C;AAC1C,yCAAsC;AAStC,SAAS,WAAW,CAAC,QAAgB;IACnC,IAAI,QAAQ,KAAK,SAAS,EAAE;QAC1B,OAAO,mBAAQ,CAAC,OAAO,CAAC;KACzB;SAAM,IAAI,QAAQ,KAAK,KAAK,EAAE;QAC7B,OAAO,mBAAQ,CAAC,GAAG,CAAC;KACrB;SAAM,IAAI,QAAQ,KAAK,MAAM,EAAE;QAC9B,OAAO,mBAAQ,CAAC,IAAI,CAAC;KACtB;IAED,MAAM,IAAI,KAAK,CAAC,qBAAqB,QAAQ,EAAE,CAAC,CAAC;AACnD,CAAC;AAED,SAAgB,eAAe,CAC7B,SAA0B,EAC1B,WAAmB,EACnB,EAA0D;IAE1D,OAAO,SAAS;SACb,OAAO,CAAC,WAAW,CAAC;SACpB,MAAM,CAAC,qBAAqB,EAAE,0BAA0B,CAAC;SACzD,MAAM,CACL,uBAAuB,EACvB,gGAAgG,CACjG;SACA,MAAM,CAAC,qBAAqB,EAAE,8CAA8C,CAAC;SAC7E,MAAM,CAAC,KAAK,EAAC,eAAe,EAAC,EAAE;;QAC9B,IAAI,eAAe,CAAC,QAAQ,EAAE;YAC5B,eAAe,CAAC,QAAQ,GAAG,WAAW,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;SAClE;aAAM;YACL,eAAe,CAAC,QAAQ,GAAG,mBAAQ,CAAC,IAAI,CAAC;SAC1C;QAED,iDAAiD;QACjD,eAAe,CAAC,eAAe,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC;QACxD,eAAe,CAAC,IAAI,GAAG,MAAA,eAAe,CAAC,IAAI,mCAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QAEjE,eAAe,CAAC,UAAU,GAAG,sBAAY,CAAC,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAElF,MAAM,OAAO,GAAG,eAA8B,CAAC;QAC/C,MAAM,YAAY,GAAG,IAAI,sBAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAE1D,IAAI;YACF,MAAM,EAAE,CAAC,YAAY,CAAC,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;SAClD;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACjB;IACH,CAAC,CAAC,CAAC;AACP,CAAC;AApCD,0CAoCC","sourcesContent":["import { CommanderStatic } from 'commander';\nimport * as tempy from 'tempy';\n\nimport { Config } from './Config';\nimport ConfigReader from './ConfigReader';\nimport { Platform } from './Platform';\n\nexport interface DefaultOptions {\n configFile: string;\n platform: Platform;\n path: string;\n shouldBeCleaned: boolean;\n}\n\nfunction mapPlatform(platform: string): Platform {\n if (platform === 'android') {\n return Platform.Android;\n } else if (platform === 'ios') {\n return Platform.iOS;\n } else if (platform === 'both') {\n return Platform.Both;\n }\n\n throw new Error(`Unknown platform: ${platform}`);\n}\n\nexport function registerCommand<OptionsType extends DefaultOptions>(\n commander: CommanderStatic,\n commandName: string,\n fn: (config: Config, options: OptionsType) => Promise<any>\n) {\n return commander\n .command(commandName)\n .option('-c, --config <path>', 'Path to the config file.')\n .option(\n '--platform <platform>',\n 'Platform for which the project should be created. Available options: `ios`, `android`, `both`.'\n )\n .option('-p, --path <string>', 'Location where the test app will be created.')\n .action(async providedOptions => {\n if (providedOptions.platform) {\n providedOptions.platform = mapPlatform(providedOptions.platform);\n } else {\n providedOptions.platform = Platform.Both;\n }\n\n // clean temp folder if the path wasn't provided.\n providedOptions.shouldBeCleaned = !providedOptions.path;\n providedOptions.path = providedOptions.path ?? tempy.directory();\n\n providedOptions.configFile = ConfigReader.getFilePath(providedOptions.configFile);\n\n const options = providedOptions as OptionsType;\n const configReader = new ConfigReader(options.configFile);\n\n try {\n await fn(configReader.readConfigFile(), options);\n } catch (e) {\n console.error(e);\n process.exit(1);\n }\n });\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expo-test-runner",
3
- "version": "0.0.3",
4
- "description": "Script that enchant test experience.",
3
+ "version": "0.0.7",
4
+ "description": "Script that enchants test experience.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
7
7
  "author": "650 Industries, Inc.",
@@ -9,6 +9,14 @@
9
9
  "bin": {
10
10
  "expo-test-runner": "bin/expo-test-runner.js"
11
11
  },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/expo/expo-test-runner.git"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/expo/expo-test-runner/issues"
18
+ },
19
+ "homepage": "https://github.com/expo/expo-test-runner#readme",
12
20
  "scripts": {
13
21
  "build": "tsc --watch --preserveWatchOutput"
14
22
  },
package/src/Utils.ts CHANGED
@@ -1,8 +1,43 @@
1
+ import spawnAsync from '@expo/spawn-async';
1
2
  import { spawnSync } from 'child_process';
2
3
 
4
+ import { Platform } from './Platform';
5
+
3
6
  export function yarnInstall(path: string) {
4
7
  spawnSync('yarn', ['install', '--silent'], { stdio: 'inherit', cwd: path });
5
8
  }
6
9
 
7
10
  export const delay: (ms: number) => Promise<void> = ms =>
8
11
  new Promise(resolve => setTimeout(resolve, ms));
12
+
13
+ export async function killEmulatorAsync(): Promise<void> {
14
+ try {
15
+ console.log('Trying to kill emulator...');
16
+ await spawnAsync('adb', ['-s', 'emulator-5554', 'emu', 'kill'], { stdio: 'inherit' });
17
+ console.log('Emulator was killed.');
18
+ } catch (e) {
19
+ console.log("Couldn't kill emulator");
20
+ console.log(e);
21
+ }
22
+ }
23
+
24
+ export async function killSimulatorAsync(): Promise<void> {
25
+ try {
26
+ console.log('Trying to kill simulator...');
27
+ await spawnAsync('xcrun', ['simctl', 'shutdown', 'all'], { stdio: 'inherit' });
28
+ console.log('Simulator was killed.');
29
+ } catch (e) {
30
+ console.log("Couldn't kill simulator.");
31
+ console.log(e);
32
+ }
33
+ }
34
+
35
+ export async function killVirtualDevicesAsync(platform: Platform): Promise<void> {
36
+ if ((platform & Platform.Android) > 0) {
37
+ await killEmulatorAsync();
38
+ }
39
+
40
+ if ((platform & Platform.iOS) > 0) {
41
+ await killSimulatorAsync();
42
+ }
43
+ }
@@ -5,6 +5,7 @@ import BundlerController from '../BundlerController';
5
5
  import { Dependency, DetoxTest } from '../Config';
6
6
  import { Platform } from '../Platform';
7
7
  import { ProjectFile, TemplateFilesFactory, UserFile } from '../TemplateFile';
8
+ import { killVirtualDevicesAsync } from '../Utils';
8
9
  import PresetTemplate from './PresetTemplate';
9
10
 
10
11
  export default class DetoxPreset extends PresetTemplate {
@@ -13,7 +14,7 @@ export default class DetoxPreset extends PresetTemplate {
13
14
  ...super.getDependencies(),
14
15
  {
15
16
  name: 'detox',
16
- path: '18.20.1',
17
+ path: '19.1.0',
17
18
  },
18
19
  ];
19
20
  }
@@ -80,10 +81,16 @@ export default class DetoxPreset extends PresetTemplate {
80
81
  }
81
82
 
82
83
  for (const conf of test.configurations) {
83
- await spawnAsync('yarn', ['detox', 'test', '-c', conf, '--ci'], {
84
- cwd: projectPath,
85
- stdio: 'inherit',
86
- });
84
+ await spawnAsync(
85
+ 'yarn',
86
+ ['detox', 'test', '-c', conf, '--ci', '--headless', '--gpu', 'swiftshader_indirect'],
87
+ {
88
+ cwd: projectPath,
89
+ stdio: 'inherit',
90
+ }
91
+ );
92
+
93
+ await killVirtualDevicesAsync(this.platform);
87
94
  }
88
95
  } finally {
89
96
  // If bundler wasn't started is noop.
@@ -27,7 +27,7 @@ function mapPlatform(platform: string): Platform {
27
27
  export function registerCommand<OptionsType extends DefaultOptions>(
28
28
  commander: CommanderStatic,
29
29
  commandName: string,
30
- fn: (config: Config, options: OptionsType) => any
30
+ fn: (config: Config, options: OptionsType) => Promise<any>
31
31
  ) {
32
32
  return commander
33
33
  .command(commandName)
@@ -52,6 +52,12 @@ export function registerCommand<OptionsType extends DefaultOptions>(
52
52
 
53
53
  const options = providedOptions as OptionsType;
54
54
  const configReader = new ConfigReader(options.configFile);
55
- fn(configReader.readConfigFile(), options);
55
+
56
+ try {
57
+ await fn(configReader.readConfigFile(), options);
58
+ } catch (e) {
59
+ console.error(e);
60
+ process.exit(1);
61
+ }
56
62
  });
57
63
  }
@@ -11,8 +11,8 @@ import com.facebook.react.ReactNativeHost;
11
11
  import com.facebook.react.ReactPackage;
12
12
  import com.facebook.soloader.SoLoader;
13
13
 
14
- import expo.modules.adapters.react.ApplicationLifecycleDispatcher;
15
- import expo.modules.adapters.react.ReactNativeHostWrapper;
14
+ import expo.modules.ApplicationLifecycleDispatcher;
15
+ import expo.modules.ReactNativeHostWrapper;
16
16
 
17
17
  import java.util.List;
18
18
 
@@ -1,7 +1,7 @@
1
1
  rootProject.name = '{{= it.name }}'
2
2
 
3
3
  // Include Expo modules
4
- apply from: new File(["node", "--print", "require.resolve('expo-modules-core/package.json')"].execute().text.trim(), "../scripts/autolinking.gradle");
4
+ apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute().text.trim(), "../scripts/autolinking.gradle");
5
5
  useExpoModules()
6
6
 
7
7
  apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle");
@@ -3,7 +3,7 @@ platform :ios, '12.0'
3
3
  # Import the auto-linking packages
4
4
  require File.join(`node --print "require.resolve('react-native/package.json')"`, "../scripts/react_native_pods")
5
5
  require File.join(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`, "../native_modules")
6
- require File.join(`node --print "require.resolve('expo-modules-core/package.json')"`, "../scripts/autolinking")
6
+ require File.join(`node --print "require.resolve('expo/package.json')"`, "../scripts/autolinking")
7
7
 
8
8
  target '{{= it.name }}' do
9
9
  use_expo_modules!
@@ -2,7 +2,7 @@
2
2
  #import <React/RCTBridgeDelegate.h>
3
3
  #import <UIKit/UIKit.h>
4
4
 
5
- #import <UMCore/UMAppDelegateWrapper.h>
5
+ #import <ExpoModulesCore/EXAppDelegateWrapper.h>
6
6
 
7
7
  @interface AppDelegate : EXAppDelegateWrapper <RCTBridgeDelegate>
8
8
 
@@ -5,14 +5,8 @@
5
5
  #import <React/RCTRootView.h>
6
6
  #import <React/RCTLinkingManager.h>
7
7
 
8
- #import <UMCore/UMModuleRegistry.h>
9
- #import <UMReactNativeAdapter/UMNativeModulesProxy.h>
10
- #import <UMReactNativeAdapter/UMModuleRegistryAdapter.h>
11
- #import <UMCore/UMModuleRegistryProvider.h>
12
-
13
8
  @interface AppDelegate () <RCTBridgeDelegate>
14
9
 
15
- @property (nonatomic, strong) EXModuleRegistryAdapter *moduleRegistryAdapter;
16
10
  @property (nonatomic, strong) NSDictionary *launchOptions;
17
11
 
18
12
  @end
@@ -21,7 +15,6 @@
21
15
 
22
16
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
23
17
  {
24
- self.moduleRegistryAdapter = [[EXModuleRegistryAdapter alloc] initWithModuleRegistryProvider:[[EXModuleRegistryProvider alloc] init]];
25
18
  self.launchOptions = launchOptions;
26
19
  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
27
20
 
@@ -46,13 +39,6 @@
46
39
  return bridge;
47
40
  }
48
41
 
49
- - (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
50
- {
51
- NSArray<id<RCTBridgeModule>> *extraModules = [_moduleRegistryAdapter extraModulesForBridge:bridge];
52
- // If you'd like to export some custom RCTBridgeModules that are not Expo modules, add them here!
53
- return extraModules;
54
- }
55
-
56
42
  - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
57
43
  #ifdef DEBUG
58
44
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];