3 ms·
Agreed! I literally just dealt with this eariler in the work week, spent hours trying to figure out why an error wasn't properly being thrown in my unit tests
by qudat 11y ago
Agreed! I literally just dealt with this eariler in the work week, spent hours trying to figure out why an error wasn't properly being thrown in my unit tests ... forgot to catch the promise chain -.-
This applies to functions that are async as well in babel:
async function get(url) {
throw new Error('hi there');
}
// wont throw the error
get('http://google.com');
// catch the error
get('http://google.com').catch(function(err) {
throw err;
});