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

Makes end-to-end testing crash on unhandled rejections #1819

Merged
merged 2 commits into from Mar 14, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -13,6 +13,13 @@
// Do this as the first thing so that any code reading it knows the right env.
process.env.NODE_ENV = 'production';

// Makes end-to-end testing crash on unhandled rejections instead of silently

This comment has been minimized.

Copy link
@gaearon

gaearon Mar 14, 2017

Member

Maybe replace "end-to-end testing" with "the script"?
User will see this after ejecting, and there's no reason why they should remove it.

// ignoring them. In the future, promise rejections that are not handled will
// terminate the Node.js process with a non-zero exit code.
process.on('unhandledRejection', err => {
throw err;
});

// Load environment variables from .env file. Suppress warnings using silent
// if this file is missing. dotenv will never modify any environment variables
// that have already been set.
@@ -9,6 +9,13 @@
*/
'use strict';

// Makes end-to-end testing crash on unhandled rejections instead of silently
// ignoring them. In the future, promise rejections that are not handled will
// terminate the Node.js process with a non-zero exit code.
process.on('unhandledRejection', err => {
throw err;
});

const fs = require('fs-extra');
const path = require('path');
const spawnSync = require('cross-spawn').sync;
@@ -9,6 +9,13 @@
*/
'use strict';

// Makes end-to-end testing crash on unhandled rejections instead of silently
// ignoring them. In the future, promise rejections that are not handled will
// terminate the Node.js process with a non-zero exit code.
process.on('unhandledRejection', err => {
throw err;
});

const fs = require('fs-extra');
const path = require('path');
const spawn = require('cross-spawn');
@@ -10,6 +10,13 @@
// @remove-on-eject-end
'use strict';

// Makes end-to-end testing crash on unhandled rejections instead of silently
// ignoring them. In the future, promise rejections that are not handled will
// terminate the Node.js process with a non-zero exit code.
process.on('unhandledRejection', err => {
throw err;
});

process.env.NODE_ENV = 'development';

// Load environment variables from .env file. Suppress warnings using silent
@@ -13,6 +13,13 @@
process.env.NODE_ENV = 'test';
process.env.PUBLIC_URL = '';

// Makes end-to-end testing crash on unhandled rejections instead of silently
// ignoring them. In the future, promise rejections that are not handled will
// terminate the Node.js process with a non-zero exit code.
process.on('unhandledRejection', err => {
throw err;
});

// Load environment variables from .env file. Suppress warnings using silent
// if this file is missing. dotenv will never modify any environment variables
// that have already been set.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.