expo / expo/eas-tests-example

`e2e/tests/utils/openApp.js` too specific

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
34
Forks
3
PR merge metrics
No merged PRs in 30d

Description

The openApp.js utility file is a great work around for local development; however, when [bootstrapping](https://wix.github.io/Detox/docs/next/introduction/project-setup#step-1-bootstrap) / [setting up Detox](https://docs.expo.dev/build-reference/e2e-tests/#3-set-up-detox), the `detoxrc.js` file can refer to a config format such as `ios.sim.debug` or some other intermediate nomenclature between & .

As such, the conditional designed to check for a `debug` environment, only passes if it is the 2nd element of a "." split array.

I propose checking to see if the configuration name contains the word "debug" instead.

```
module.exports.openApp = async function openApp() {
const config = await resolveConfig();
if (config.configurationName.split(".").includes("debug")) {
return await openAppForDebugBuild(platform);
} else {
return await device.launchApp({
newInstance: true,
});
}
};
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.