hasKey = function(obj, keyName) {
    return obj != null && obj[keyName] !== jasmine.undefined;
  }
Matcher that checks that the expected exception was thrown by the actual.

@param {String} [expected]