Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: unified configuration #2038

Merged
merged 16 commits into from May 7, 2020
Merged

refactor: unified configuration #2038

merged 16 commits into from May 7, 2020

Conversation

noomorph
Copy link
Collaborator

@noomorph noomorph commented May 5, 2020

Description:

Prepares ground for landing #1910.

Slightly extends configuration capabilities, but the main point is that a configuration object for new Detox now contains all data it needs. No more scattering over places and files.

As a side effect, you can specify all that you previously could do via detox.init(config, userParams), but now those params reside also in package.json Detox's section, called behavior.

{
  "detox": {
    "behavior": {
      "init": {
        "reinstallApp": true,
        "launchApp": true,
        "exposeGlobals": true
      },
      "cleanup": {
        "shutdownDevice": false
      }
    },
  }
}

Also, this PR fixes a partially incorrect custom driver require logic, where it was not using process.cwd() to resolve relative path dependencies.

I plan to add the new config object extension to the markdown docs, and merge.

@coveralls
Copy link

coveralls commented May 7, 2020

Pull Request Test Coverage Report for Build 2136

  • 79 of 82 (96.34%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 76.926%

Changes Missing Coverage Covered Lines Changed/Added Lines %
detox/src/server/DetoxServer.js 8 11 72.73%
Totals Coverage Status
Change from base Build 1171: 0.01%
Covered Lines: 3196
Relevant Lines: 3866

💛 - Coveralls

@noomorph noomorph marked this pull request as ready for review May 7, 2020 08:35
@noomorph noomorph requested a review from rotemmiz as a code owner May 7, 2020 08:35
@noomorph noomorph merged commit c827545 into master May 7, 2020
@noomorph noomorph deleted the feat/unified-configuration branch May 7, 2020 12:32
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants