dist/ng-describe.js
function raises(fn, errorValidator) {
    check.verify.fn(fn, 'expected function that raises');
    try {
      fn();
    } catch (err) {
      if (typeof errorValidator === 'undefined') {
        return true;
      }
      if (typeof errorValidator === 'function') {
        return errorValidator(err);
      }
      return false;
    }
    // error has not been raised
    return false;
  }
function raises(fn, errorValidator) {
    check.verify.fn(fn, 'expected function that raises');
    try {
      fn();
    } catch (err) {
      if (typeof errorValidator === 'undefined') {
        return true;
      }
      if (typeof errorValidator === 'function') {
        return errorValidator(err);
      }
      return false;
    }
    // error has not been raised
    return false;
  }
function raises ( fn , errorValidator ) { check . verify . fn ( fn , 'expected function that raises' ) ; try { fn ( ) ; } catch ( err ) { if ( typeof errorValidator === 'undefined' ) { return true ; } if ( typeof errorValidator === 'function' ) { return errorValidator ( err ) ; } return false ; } // error has not been raised return false ; }
Checks if given function raises an error

@method raises
Checks if given function raises an error