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:
@@ -133,7 +133,7 @@ getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
|
|||||||
'toMatch',
|
'toMatch',
|
||||||
'toThrow',
|
'toThrow',
|
||||||
'toThrowError',
|
'toThrowError',
|
||||||
'toThrowMatching',
|
'toThrowMatching'
|
||||||
],
|
],
|
||||||
matchers = {};
|
matchers = {};
|
||||||
|
|
||||||
@@ -499,18 +499,6 @@ getJasmineRequireObj().util = function(j$) {
|
|||||||
return Object.prototype.hasOwnProperty.call(obj, key);
|
return Object.prototype.hasOwnProperty.call(obj, key);
|
||||||
};
|
};
|
||||||
|
|
||||||
function anyMatch(pattern, lines) {
|
|
||||||
var i;
|
|
||||||
|
|
||||||
for (i = 0; i < lines.length; i++) {
|
|
||||||
if (lines[i].match(pattern)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
util.errorWithStack = function errorWithStack () {
|
util.errorWithStack = function errorWithStack () {
|
||||||
// Don't throw and catch if we don't have to, because it makes it harder
|
// Don't throw and catch if we don't have to, because it makes it harder
|
||||||
// for users to debug their code with exception breakpoints.
|
// for users to debug their code with exception breakpoints.
|
||||||
@@ -537,8 +525,6 @@ getJasmineRequireObj().util = function(j$) {
|
|||||||
var result;
|
var result;
|
||||||
|
|
||||||
return function() {
|
return function() {
|
||||||
var trace;
|
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
result = callerFile();
|
result = callerFile();
|
||||||
}
|
}
|
||||||
@@ -592,7 +578,7 @@ getJasmineRequireObj().Spec = function(j$) {
|
|||||||
passedExpectations: [],
|
passedExpectations: [],
|
||||||
deprecationWarnings: [],
|
deprecationWarnings: [],
|
||||||
pendingReason: '',
|
pendingReason: '',
|
||||||
duration: null,
|
duration: null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1099,9 +1085,6 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
return buildExpectationResult(attrs);
|
return buildExpectationResult(attrs);
|
||||||
};
|
};
|
||||||
|
|
||||||
var maximumSpecCallbackDepth = 20;
|
|
||||||
var currentSpecCallbackDepth = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether Jasmine should throw an Error when an expectation fails.
|
* Sets whether Jasmine should throw an Error when an expectation fails.
|
||||||
* This causes a spec to only have one expectation failure.
|
* This causes a spec to only have one expectation failure.
|
||||||
@@ -1622,7 +1605,7 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
timeout: timeout || 0
|
timeout: timeout || 0
|
||||||
},
|
},
|
||||||
throwOnExpectationFailure: config.oneFailurePerSpec,
|
throwOnExpectationFailure: config.oneFailurePerSpec,
|
||||||
timer: new j$.Timer(),
|
timer: new j$.Timer()
|
||||||
});
|
});
|
||||||
return spec;
|
return spec;
|
||||||
|
|
||||||
@@ -3780,7 +3763,6 @@ getJasmineRequireObj().matchersUtil = function(j$) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
for (i = 0; i < aLength || i < bLength; i++) {
|
for (i = 0; i < aLength || i < bLength; i++) {
|
||||||
var formatter = false;
|
|
||||||
diffBuilder.withPath(i, function() {
|
diffBuilder.withPath(i, function() {
|
||||||
if (i >= bLength) {
|
if (i >= bLength) {
|
||||||
diffBuilder.record(a[i], void 0, actualArrayIsLongerFormatter);
|
diffBuilder.record(a[i], void 0, actualArrayIsLongerFormatter);
|
||||||
@@ -3972,10 +3954,6 @@ getJasmineRequireObj().matchersUtil = function(j$) {
|
|||||||
return extraKeys;
|
return extraKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
function has(obj, key) {
|
|
||||||
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
function isFunction(obj) {
|
function isFunction(obj) {
|
||||||
return typeof obj === 'function';
|
return typeof obj === 'function';
|
||||||
}
|
}
|
||||||
@@ -4142,7 +4120,7 @@ getJasmineRequireObj().toBe = function(j$) {
|
|||||||
return {
|
return {
|
||||||
compare: function(actual, expected) {
|
compare: function(actual, expected) {
|
||||||
var result = {
|
var result = {
|
||||||
pass: actual === expected,
|
pass: actual === expected
|
||||||
};
|
};
|
||||||
|
|
||||||
if (typeof expected === 'object') {
|
if (typeof expected === 'object') {
|
||||||
@@ -4248,7 +4226,7 @@ getJasmineRequireObj().toBeFalsy = function() {
|
|||||||
return {
|
return {
|
||||||
compare: function(actual) {
|
compare: function(actual) {
|
||||||
return {
|
return {
|
||||||
pass: !!!actual
|
pass: !actual
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -6890,7 +6868,7 @@ getJasmineRequireObj().Suite = function(j$) {
|
|||||||
fullName: this.getFullName(),
|
fullName: this.getFullName(),
|
||||||
failedExpectations: [],
|
failedExpectations: [],
|
||||||
deprecationWarnings: [],
|
deprecationWarnings: [],
|
||||||
duration: null,
|
duration: null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -307,9 +307,6 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
return buildExpectationResult(attrs);
|
return buildExpectationResult(attrs);
|
||||||
};
|
};
|
||||||
|
|
||||||
var maximumSpecCallbackDepth = 20;
|
|
||||||
var currentSpecCallbackDepth = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether Jasmine should throw an Error when an expectation fails.
|
* Sets whether Jasmine should throw an Error when an expectation fails.
|
||||||
* This causes a spec to only have one expectation failure.
|
* This causes a spec to only have one expectation failure.
|
||||||
@@ -830,7 +827,7 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
timeout: timeout || 0
|
timeout: timeout || 0
|
||||||
},
|
},
|
||||||
throwOnExpectationFailure: config.oneFailurePerSpec,
|
throwOnExpectationFailure: config.oneFailurePerSpec,
|
||||||
timer: new j$.Timer(),
|
timer: new j$.Timer()
|
||||||
});
|
});
|
||||||
return spec;
|
return spec;
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ getJasmineRequireObj().Spec = function(j$) {
|
|||||||
passedExpectations: [],
|
passedExpectations: [],
|
||||||
deprecationWarnings: [],
|
deprecationWarnings: [],
|
||||||
pendingReason: '',
|
pendingReason: '',
|
||||||
duration: null,
|
duration: null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ getJasmineRequireObj().Suite = function(j$) {
|
|||||||
fullName: this.getFullName(),
|
fullName: this.getFullName(),
|
||||||
failedExpectations: [],
|
failedExpectations: [],
|
||||||
deprecationWarnings: [],
|
deprecationWarnings: [],
|
||||||
duration: null,
|
duration: null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,6 @@ getJasmineRequireObj().matchersUtil = function(j$) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
for (i = 0; i < aLength || i < bLength; i++) {
|
for (i = 0; i < aLength || i < bLength; i++) {
|
||||||
var formatter = false;
|
|
||||||
diffBuilder.withPath(i, function() {
|
diffBuilder.withPath(i, function() {
|
||||||
if (i >= bLength) {
|
if (i >= bLength) {
|
||||||
diffBuilder.record(a[i], void 0, actualArrayIsLongerFormatter);
|
diffBuilder.record(a[i], void 0, actualArrayIsLongerFormatter);
|
||||||
@@ -417,10 +416,6 @@ getJasmineRequireObj().matchersUtil = function(j$) {
|
|||||||
return extraKeys;
|
return extraKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
function has(obj, key) {
|
|
||||||
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
function isFunction(obj) {
|
function isFunction(obj) {
|
||||||
return typeof obj === 'function';
|
return typeof obj === 'function';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
|
|||||||
'toMatch',
|
'toMatch',
|
||||||
'toThrow',
|
'toThrow',
|
||||||
'toThrowError',
|
'toThrowError',
|
||||||
'toThrowMatching',
|
'toThrowMatching'
|
||||||
],
|
],
|
||||||
matchers = {};
|
matchers = {};
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ getJasmineRequireObj().toBe = function(j$) {
|
|||||||
return {
|
return {
|
||||||
compare: function(actual, expected) {
|
compare: function(actual, expected) {
|
||||||
var result = {
|
var result = {
|
||||||
pass: actual === expected,
|
pass: actual === expected
|
||||||
};
|
};
|
||||||
|
|
||||||
if (typeof expected === 'object') {
|
if (typeof expected === 'object') {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ getJasmineRequireObj().toBeFalsy = function() {
|
|||||||
return {
|
return {
|
||||||
compare: function(actual) {
|
compare: function(actual) {
|
||||||
return {
|
return {
|
||||||
pass: !!!actual
|
pass: !actual
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -100,18 +100,6 @@ getJasmineRequireObj().util = function(j$) {
|
|||||||
return Object.prototype.hasOwnProperty.call(obj, key);
|
return Object.prototype.hasOwnProperty.call(obj, key);
|
||||||
};
|
};
|
||||||
|
|
||||||
function anyMatch(pattern, lines) {
|
|
||||||
var i;
|
|
||||||
|
|
||||||
for (i = 0; i < lines.length; i++) {
|
|
||||||
if (lines[i].match(pattern)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
util.errorWithStack = function errorWithStack () {
|
util.errorWithStack = function errorWithStack () {
|
||||||
// Don't throw and catch if we don't have to, because it makes it harder
|
// Don't throw and catch if we don't have to, because it makes it harder
|
||||||
// for users to debug their code with exception breakpoints.
|
// for users to debug their code with exception breakpoints.
|
||||||
@@ -138,8 +126,6 @@ getJasmineRequireObj().util = function(j$) {
|
|||||||
var result;
|
var result;
|
||||||
|
|
||||||
return function() {
|
return function() {
|
||||||
var trace;
|
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
result = callerFile();
|
result = callerFile();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user