function assertThrows(f) {
  var triggeredError = false;
  try {
    f();
  } catch (err) {
    triggeredError = true;
  }
  if (!triggeredError)
    throw new Error('Assertion Failed: throw expected.');
}
/**
 * Verifies that a test evaluation results in an exception.
 * @param {!Function} f The test function.
 */
Verifies that a test evaluation results in an exception.
@param {!Function} f The test function.
Verifies that a test evaluation results in an exception . @param { !Function } f The test function .
function assertThrows(f) {
  var triggeredError = false;
  try {
    f();
  } catch (err) {
    triggeredError = true;
  }
  if (!triggeredError)
    throw new Error('Assertion Failed: throw expected.');
}
function assertThrows ( f ) { var triggeredError = false ; try { f ( ) ; } catch ( err ) { triggeredError = true ; } if ( ! triggeredError ) throw new Error ( 'Assertion Failed: throw expected.' ) ; }
Verifies that a test evaluation results in an exception.
Verifies that a test evaluation results in an exception .