function checkForAssertionErrors(args) {
  const isAssertion =
    args &&
    args.length > 0 &&
    typeof args[0] === 'object' &&
    args[0] !== null &&
    args[0].name === 'AssertionError';

  if (isAssertion) {
    args = Array.prototype.slice.call(args);
    args.unshift(`assert(${args[0].message})`);
  }
  return args;
}
function checkForAssertionErrors(args) {
  const isAssertion =
    args &&
    args.length > 0 &&
    typeof args[0] === 'object' &&
    args[0] !== null &&
    args[0].name === 'AssertionError';

  if (isAssertion) {
    args = Array.prototype.slice.call(args);
    args.unshift(`assert(${args[0].message})`);
  }
  return args;
}
function checkForAssertionErrors ( args ) { const isAssertion = args && args . length > 0 && typeof args [ 0 ] === 'object' && args [ 0 ] !== null && args [ 0 ] . name === 'AssertionError' ; if ( isAssertion ) { args = Array . prototype . slice . call ( args ) ; args . unshift ( ` ${ args [ 0 ] . message } ` ) ; } return args ; }
Assertions don't generate standard exceptions and don't print nicely
Assertions don t generate standard exceptions and don t print nicely
Check if an error is thrown