diff --git a/lib/jasmine-node/jasmine-1.3.1.js b/lib/jasmine-node/jasmine-1.3.1.js
index 3cb32a8..0e67725 100644
--- a/lib/jasmine-node/jasmine-1.3.1.js
+++ b/lib/jasmine-node/jasmine-1.3.1.js
@@ -22,6 +22,22 @@ jasmine.unimplementedMethod_ = function() {
*/
jasmine.undefined = jasmine.___undefined___;
+/**
+ * Use jasmine.POSITIVE_INFINITY
instead of Infinity
, since Infinity
is just
+ * a plain old variable and may be redefined by somebody else.
+ *
+ * @private
+ */
+jasmine.POSITIVE_INFINITY = Infinity;
+
+/**
+ * Use jasmine.NEGATIVE_INFINITY
instead of -Infinity
, since -Infinity
is just
+ * a plain old variable and may be redefined by somebody else.
+ *
+ * @private
+ */
+jasmine.NEGATIVE_INFINITY = -Infinity;
+
/**
* Show diagnostic messages in the console if set to true
*
@@ -1414,6 +1430,28 @@ jasmine.Matchers.prototype.toBeNaN = function() {
return (this.actual !== this.actual);
};
+/**
+ * Matcher that compares the actual to Infinity.
+ */
+jasmine.Matchers.prototype.toBePositiveInfinity = function() {
+ this.message = function() {
+ return [ "Expected " + jasmine.pp(this.actual) + " to be Infinity." ];
+ };
+
+ return (this.actual === jasmine.POSITIVE_INFINITY);
+};
+
+/**
+ * Matcher that compares the actual to -Infinity.
+ */
+jasmine.Matchers.prototype.toBeNegativeInfinity = function() {
+ this.message = function() {
+ return [ "Expected " + jasmine.pp(this.actual) + " to be -Infinity." ];
+ };
+
+ return (this.actual === jasmine.NEGATIVE_INFINITY);
+};
+
/**
* Matcher that boolean not-nots the actual.
*/