mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-23 20:51:12 +08:00
Make scripts crash on unhandled rejections (#1819)
* Makes end-to-end testing crash on unhandled rejections * Comment fix
This commit is contained in:
7
packages/react-scripts/scripts/test.js
vendored
7
packages/react-scripts/scripts/test.js
vendored
@@ -13,6 +13,13 @@
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.PUBLIC_URL = '';
|
||||
|
||||
// Makes the script 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.
|
||||
|
||||
Reference in New Issue
Block a user