Created by: dbismut
This makes sure that end-to-end-testing crash when scripts/*.js
run into an unhandled promise rejection as explained here https://github.com/facebookincubator/create-react-app/issues/1806#issuecomment-286146425.
This code has been added at the beginning of each script:
process.on('unhandledRejection', err => {
throw err;
});
Before
Faulty eject.js
fails silently.


After
Faulty eject.js
makes end-to-end testing crash.

Note that the bug outlined above should be fixed by #1810.
Activity
Created by: facebook-github-bot
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!
If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.
Created by: Timer
We should probably land this followed by https://github.com/facebookincubator/create-react-app/pull/1810 immediately after.
LGTM if it LG2Y @gaearon.
Created by: Timer
Heh, you cherry-picked.
Basically:
# Switch to your feature branch $ git checkout e2e-testing-to-crash-on-unhandled-rejection # wow this is a huge branch name # Add the upstream repository as a remote $ git remote add upstream git@github.com:facebookincubator/create-react-app.git # if not already # Fetch upstream, creates upstream/* references $ git fetch upstream # Rebase your current branch onto upstream/master $ git rebase upstream/master # Force push to your branch (origin/e2e-testing-to-crash-on-unhandled-rejection) since you re-wrote history $ git push -f