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

feat: undeprecate "specs" in package.json #1290

Merged
merged 12 commits into from
Apr 18, 2019

Conversation

noomorph
Copy link
Collaborator

@noomorph noomorph commented Apr 16, 2019

Description:

In [email protected] there was a premature deprecation of "specs" property in detox section of package.json. It appeared inconvenient for anyone who prefers terse commands like detox test over verbose detox test e2e. From now on, "specs" property will act as a fallback if a specific test folder has not been specified. For example (1):

detox test   # translates to: mocha <...args> e2e
detox test e2e/01.sanity.test.js  # translates to: mocha <...args> e2e/01.sanity.test.js

For the reference, previously it used to work like (2):

detox test   # translates to: mocha <...args> e2e
detox test e2e/01.sanity.test.js  # translates to: mocha <...args> e2e e2e/01.sanity.test.js

The problem of the latter was that you could not focus (override defaults) on a specific test file without having to use specs in package.json and deprecated --specs in the command line (3):

detox test --specs e2e/01.sanity.test.js  # overrides specs in package.json
# mocha <...args> e2e/01.sanity.test.js

Since (2) has been introduced very recently and did not function well, I suggest to consider this rather a minor version than a breaking change.

Your considerations are welcome.

P. S. As for file deprecation warning, it has been reworked and looks like on the screenshot:

Screenshot from 2019-04-16 12-20-49

@noomorph noomorph requested a review from LeoNatan April 16, 2019 09:18
@noomorph noomorph requested a review from rotemmiz as a code owner April 16, 2019 09:18
@LeoNatan
Copy link
Contributor

Any luck finding why it showed an unrelated error when specs was not provided?

@noomorph
Copy link
Collaborator Author

@LeoNatan, yes, it was a bug in mocha@^5.0.0. After upgrading to mocha@^6.0.0, that weird error has disappeared, now it is comprehensible:

Screenshot from 2019-04-17 08-44-07

@noomorph
Copy link
Collaborator Author

@LeoNatan, as far as I understand, it is a synergy of those pull requests that resolved the weird error:

mochajs/mocha#3650
mochajs/mocha#3654
mochajs/mocha#3692

The mocha contributors have fixed a lot of command-line interface errors, as can be seen in their CHANGELOG.

docs/Guide.Migration.md Outdated Show resolved Hide resolved
detox/test/package.json Outdated Show resolved Hide resolved
noomorph added a commit that referenced this pull request Apr 18, 2019
@noomorph noomorph requested a review from LeoNatan April 18, 2019 07:05
@noomorph noomorph merged commit 34b5691 into master Apr 18, 2019
@noomorph noomorph deleted the noomorph/feat/undeprecate-specs branch April 18, 2019 08:17
@lock lock bot locked as resolved and limited conversation to collaborators Apr 21, 2019
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.

2 participants