-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix jest test runner #371
Fix jest test runner #371
Conversation
@rotemmiz One of the builds failed because of an issue with npm, could you manually trigger another build?
|
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.
Can you please separate the fix itself from example so it is easier to review?
detox/local-cli/detox-test.js
Outdated
reuse: program.reuse, | ||
debugSynchronization: program.debugSynchronization, | ||
artifactsLocation: program.artifactsLocation | ||
configuration: program.configuration || '', |
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.
Can you stick to defaults that commander
use?
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.
Because the flags are ''
the defaults will be used by the commander - similar to mocha.
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.
I'm just saying that instead of using || ''
everywhere in the execSync
command you can specify defaults to
program.option
s in the beginning of the file. It supports three parameters in .option
chain:
program.option('-flag', 'description', 'defaults')
so your || ''
can be re-written in a more elegant way. For instance,
program.option('-l, --log-level', 'Log level ...', '')
where third ''
is a default value.
Does it make sense?
@Kureev , I have updated the commander defaults. |
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.
🎉
Hi @rotemmiz! I think this one is ready to be merged |
I can confirm this is needed for Jest runner to work. |
let's do it |
Hey @SMJ93, thank you very much for this PR! There are two issues I wanted to discuss before we merge it:
|
@rotemmiz no worries! Regarding your issues:
|
Sorry @SMJ93 , I won't accept a workaround solution. We either need to understand what causes Jest to act weirdly (probably they way argparse is being consumed around |
@SMJ93 , can I use the email in your github account to invite you to our slack group ? |
@rotemmiz, I understand what you're saying, but at the moment the Jest test runner is broken on both iOS and Android. This would allow people to use it for the time being while we find a better fix / understand the problem better. Yeah sure. I'll be on after work. |
@rotemmiz what is missing in this PR? |
Hey @sibelius , my comment above #371 (comment). This PR will probably won't make it into master. We are actually doing a few changes internally, that will include fixes for this issue, and a few others with Jest, as preliminaries to a bigger task we plan to publish soon, parallelization support for detox tests... |
@rotemmiz, is there an ETA for this fix? |
A few breaking changes in the configuration, but we believe its a sane and more usable API than what we have today. I'm closing this PR as what it tried to solve was solved in the PR 423. |
Fix jest test runner on Android and iOS.
Handle no configuration flags in the Jest runner.
Should fix #362 and #363
New up to date demo project for react native which uses jest as a test runner.
To run: