-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Test local commands #56
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
Conversation
Not sure what's happening on Travis, I don't have access to the logs. @gaearon could you check? |
This is because both argv checks assume there is only one argument. So you can't pass both --debug-template and --smoke-test. Replacing the comparisons with indexOf in both places should do the trick. |
Sorry, where do I pass |
It is being passed from This flag is read in DEV Webpack config. But there is another flag (for smoke test) read in The smoke test flag ensures process terminates. (This is why your PR fails. Smoke test flag is tested for exact match with |
The problem is in the comparison. It compares |
Ahh, I got what you mean now, thanks. Should be fixed in the last commit, let's see if Travis passes… ✨ |
Now that I think of it we probably should search argv array itself. Also need to do it in both places. |
Since it's starting to be complicated parsing of arguments, should probably use minimist: https://github.com/facebookincubator/create-react-app/blob/master/global-cli/index.js#L43 |
Should just be a case of running |
Where's the other place? |
This took way longer than anticipated, but should finally be done hopefully! |
😄 |
God dammit, merge conflict |
Merge?! |
npm run build | ||
|
||
# Check for expected output | ||
test -e build/*.html || exit 1 |
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.
You don't need the exit 1. We use set -e which bails on any commands that returns non 0
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 added those in the first place, I didn’t realize that.
@mxstbr You can kill them throughout this script
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.
Done!
Got it, thanks. I’ll rebase this new because there’s another conflict 😄 |
Thanks! Sorry this took that long 🙏 |
Reference #52 (comment), hope this works…