expo-test-runner 0.0.6 → 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/bin/expo-test-runner.js
CHANGED
|
File without changes
|
|
@@ -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,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,
|
|
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,cAAc,EAAE;YACzB,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa;SACzC,CAAC;IACJ,CAAC;IACQ,gBAAgB;;QACvB,MAAM,GAAG,GAAG,IAAI,mCAAoB,CAAC,O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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"]}
|
package/package.json
CHANGED