-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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: add --platform
flag to override haste.defaultPlatform
#11764
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11764 +/- ##
==========================================
- Coverage 69.00% 68.98% -0.02%
==========================================
Files 312 312
Lines 16339 16345 +6
Branches 4736 4740 +4
==========================================
+ Hits 11275 11276 +1
- Misses 5036 5041 +5
Partials 28 28
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A changelog entry seems to be missing 🙂
Thanks, I thought I pushed it already 😄 |
1b9d2c1
to
ef1211d
Compare
ef1211d
to
f58be19
Compare
@SimenB: I would really appreciate it if you reviewed this PR and let me know how I can improve it. |
Hi! Sorry about the delay. Is there any reason you cannot use the existent |
Ah, it didn't occur to me that it exists (I combed through CLI options looking for it), even though I touched the code 😛 Does that mean that we could do something like |
@tido64 |
I agree it's more user friendly, but a metric ton of options isn't very nice either... Also, passing both (And yeah, there's a bunch of CLI args we haven't documented - |
This PR is stale because it has been open 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Adds a new flag,
--platform
, to overridehaste.defaultPlatform
option. This is useful for tests that need to be run against multiple platform targets. Previously, you would need separate Jest configs for each platform and sethaste.defaultPlatform
accordingly. With this flag, you can have one config and instead specify--platform ios
instead.Test plan
Normally, running
react-native
tests without a haste configuration will fail:With this change, you can now specify the platform from the command line: