Merge branch 'enelson/src-cleanup-2' of https://github.com/elliot-nelson/jasmine into elliot-nelson-enelson/src-cleanup-2

- Merges #1708 from @elliot-nelson
This commit is contained in:
Gregg Van Hove
2019-05-21 17:44:48 -07:00
19 changed files with 46 additions and 90 deletions

View File

@@ -225,7 +225,6 @@ getJasmineRequireObj().matchersUtil = function(j$) {
});
for (i = 0; i < aLength || i < bLength; i++) {
var formatter = false;
diffBuilder.withPath(i, function() {
if (i >= bLength) {
diffBuilder.record(a[i], void 0, actualArrayIsLongerFormatter);
@@ -417,10 +416,6 @@ getJasmineRequireObj().matchersUtil = function(j$) {
return extraKeys;
}
function has(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
}
function isFunction(obj) {
return typeof obj === 'function';
}

View File

@@ -28,7 +28,7 @@ getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
'toMatch',
'toThrow',
'toThrowError',
'toThrowMatching',
'toThrowMatching'
],
matchers = {};

View File

@@ -13,7 +13,7 @@ getJasmineRequireObj().toBe = function(j$) {
return {
compare: function(actual, expected) {
var result = {
pass: actual === expected,
pass: actual === expected
};
if (typeof expected === 'object') {

View File

@@ -10,7 +10,7 @@ getJasmineRequireObj().toBeFalsy = function() {
return {
compare: function(actual) {
return {
pass: !!!actual
pass: !actual
};
}
};

View File

@@ -20,7 +20,7 @@ getJasmineRequireObj().toHaveBeenCalledTimes = function(j$) {
var args = Array.prototype.slice.call(arguments, 0),
result = { pass: false };
if (!j$.isNumber_(expected)){
if (!j$.isNumber_(expected)) {
throw new Error(getErrorMsg('The expected times failed is a required argument and must be a number.'));
}