What does "node --unhandled-rejections=strict" mean?


node --unhandled-rejections=strict main.js

Sure good question!   Focus on the word *unhandled*   It means:   Normally , when an error happens (remember "errors" are also called "exceptions") then we handle them by doing : try:   //Do something catch A-Spesific-error:    // Handle the error The above is an example of a *handled* exception.   An *unhandled* except/error is when an error happens which we're not looking out for.   Normally it is best to handle *every* possible exception.   The default behaviour of nodejs is to *stop* when an exception/error happens which we have not handled. This is good, because   Imagine you're a bank, and an error happens which you weren't expecting, and the code continues! 😱that would be bad.   However, we are OK/happy for the tests to continue when an unhandled exception happens. So, we have to change the default nodejs behaviour.   Please ask any more questions about this, it's very useful/important because it helps write more stable software 🙂🙌