Update built distribution, it's a few commits behind
This commit is contained in:
@@ -22,11 +22,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
*/
|
*/
|
||||||
jasmineRequire.html = function(j$) {
|
jasmineRequire.html = function(j$) {
|
||||||
j$.ResultsNode = jasmineRequire.ResultsNode();
|
j$.ResultsNode = jasmineRequire.ResultsNode();
|
||||||
j$.HtmlReporter = jasmineRequire.HtmlReporter();
|
j$.HtmlReporter = jasmineRequire.HtmlReporter(j$);
|
||||||
j$.QueryString = jasmineRequire.QueryString();
|
j$.QueryString = jasmineRequire.QueryString();
|
||||||
j$.HtmlSpecFilter = jasmineRequire.HtmlSpecFilter();
|
j$.HtmlSpecFilter = jasmineRequire.HtmlSpecFilter();
|
||||||
};
|
};
|
||||||
jasmineRequire.HtmlReporter = function() {
|
jasmineRequire.HtmlReporter = function(j$) {
|
||||||
|
|
||||||
var noopTimer = {
|
var noopTimer = {
|
||||||
start: function(){},
|
start: function(){},
|
||||||
|
|||||||
+24
-12
@@ -576,7 +576,7 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
|
|
||||||
// TODO: move this to closure
|
// TODO: move this to closure
|
||||||
Env.prototype.describe = function(description, specDefinitions) {
|
Env.prototype.describe = function(description, specDefinitions) {
|
||||||
var suite = this.suiteFactory(description, specDefinitions);
|
var suite = this.suiteFactory(description);
|
||||||
|
|
||||||
var parentSuite = this.currentSuite;
|
var parentSuite = this.currentSuite;
|
||||||
parentSuite.addSuite(suite);
|
parentSuite.addSuite(suite);
|
||||||
@@ -1156,7 +1156,7 @@ getJasmineRequireObj().ObjectContaining = function(j$) {
|
|||||||
mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
|
mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
|
||||||
}
|
}
|
||||||
else if (!j$.matchersUtil.equals(this.sample[property], other[property], mismatchKeys, mismatchValues)) {
|
else if (!j$.matchersUtil.equals(this.sample[property], other[property], mismatchKeys, mismatchValues)) {
|
||||||
mismatchValues.push("'" + property + "' was '" + (other[property] ? j$.util.htmlEscape(other[property].toString()) : other[property]) + "' in expected, but was '" + (this.sample[property] ? j$.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + "' in actual.");
|
mismatchValues.push("'" + property + "' was '" + (other[property] ? j$.util.htmlEscape(other[property].toString()) : other[property]) + "' in actual, but was '" + (this.sample[property] ? j$.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + "' in expected.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2110,7 +2110,9 @@ getJasmineRequireObj().toThrowError = function(j$) {
|
|||||||
thrown,
|
thrown,
|
||||||
errorType,
|
errorType,
|
||||||
message,
|
message,
|
||||||
regexp;
|
regexp,
|
||||||
|
name,
|
||||||
|
constructorName;
|
||||||
|
|
||||||
if (typeof actual != "function") {
|
if (typeof actual != "function") {
|
||||||
throw new Error("Actual is not a Function");
|
throw new Error("Actual is not a Function");
|
||||||
@@ -2134,32 +2136,37 @@ getJasmineRequireObj().toThrowError = function(j$) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (arguments.length == 1) {
|
if (arguments.length == 1) {
|
||||||
return pass("Expected function not to throw an Error, but it threw " + thrown + ".");
|
return pass("Expected function not to throw an Error, but it threw " + fnNameFor(thrown) + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (errorType) {
|
||||||
|
name = fnNameFor(errorType);
|
||||||
|
constructorName = fnNameFor(thrown.constructor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errorType && message) {
|
if (errorType && message) {
|
||||||
if (thrown.constructor == errorType && util.equals(thrown.message, message)) {
|
if (thrown.constructor == errorType && util.equals(thrown.message, message)) {
|
||||||
return pass("Expected function not to throw " + errorType.name + " with message \"" + message + "\".");
|
return pass("Expected function not to throw " + name + " with message \"" + message + "\".");
|
||||||
} else {
|
} else {
|
||||||
return fail("Expected function to throw " + errorType.name + " with message \"" + message +
|
return fail("Expected function to throw " + name + " with message \"" + message +
|
||||||
"\", but it threw " + thrown.constructor.name + " with message \"" + thrown.message + "\".");
|
"\", but it threw " + constructorName + " with message \"" + thrown.message + "\".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errorType && regexp) {
|
if (errorType && regexp) {
|
||||||
if (thrown.constructor == errorType && regexp.test(thrown.message)) {
|
if (thrown.constructor == errorType && regexp.test(thrown.message)) {
|
||||||
return pass("Expected function not to throw " + errorType.name + " with message matching " + regexp + ".");
|
return pass("Expected function not to throw " + name + " with message matching " + regexp + ".");
|
||||||
} else {
|
} else {
|
||||||
return fail("Expected function to throw " + errorType.name + " with message matching " + regexp +
|
return fail("Expected function to throw " + name + " with message matching " + regexp +
|
||||||
", but it threw " + thrown.constructor.name + " with message \"" + thrown.message + "\".");
|
", but it threw " + constructorName + " with message \"" + thrown.message + "\".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errorType) {
|
if (errorType) {
|
||||||
if (thrown.constructor == errorType) {
|
if (thrown.constructor == errorType) {
|
||||||
return pass("Expected function not to throw " + errorType.name + ".");
|
return pass("Expected function not to throw " + name + ".");
|
||||||
} else {
|
} else {
|
||||||
return fail("Expected function to throw " + errorType.name + ", but it threw " + thrown.constructor.name + ".");
|
return fail("Expected function to throw " + name + ", but it threw " + constructorName + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2181,6 +2188,10 @@ getJasmineRequireObj().toThrowError = function(j$) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fnNameFor(func) {
|
||||||
|
return func.name || func.toString().match(/^\s*function\s*(\w*)\s*\(/)[1];
|
||||||
|
}
|
||||||
|
|
||||||
function pass(notMessage) {
|
function pass(notMessage) {
|
||||||
return {
|
return {
|
||||||
pass: true,
|
pass: true,
|
||||||
@@ -2246,6 +2257,7 @@ getJasmineRequireObj().toThrowError = function(j$) {
|
|||||||
|
|
||||||
return toThrowError;
|
return toThrowError;
|
||||||
};
|
};
|
||||||
|
|
||||||
getJasmineRequireObj().version = function() {
|
getJasmineRequireObj().version = function() {
|
||||||
return "2.0.0-alpha";
|
return "2.0.0-alpha";
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user