Move ExpectationResult into its own file
This commit is contained in:
+19
-20
@@ -102,26 +102,6 @@ jasmine.MessageResult.prototype.toString = function() {
|
|||||||
return text;
|
return text;
|
||||||
};
|
};
|
||||||
|
|
||||||
jasmine.ExpectationResult = function(params) {
|
|
||||||
this.type = 'expect';
|
|
||||||
this.matcherName = params.matcherName;
|
|
||||||
this.passed_ = params.passed;
|
|
||||||
this.expected = params.expected;
|
|
||||||
this.actual = params.actual;
|
|
||||||
this.message = this.passed_ ? 'Passed.' : params.message;
|
|
||||||
|
|
||||||
var trace = (params.trace || new Error(this.message));
|
|
||||||
this.trace = this.passed_ ? '' : trace;
|
|
||||||
};
|
|
||||||
|
|
||||||
jasmine.ExpectationResult.prototype.toString = function () {
|
|
||||||
return this.message;
|
|
||||||
};
|
|
||||||
|
|
||||||
jasmine.ExpectationResult.prototype.passed = function () {
|
|
||||||
return this.passed_;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for the Jasmine environment. Ensures one gets created
|
* Getter for the Jasmine environment. Ensures one gets created
|
||||||
*/
|
*/
|
||||||
@@ -528,6 +508,25 @@ jasmine.util.extend = function(destination, source) {
|
|||||||
return destination;
|
return destination;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
jasmine.ExpectationResult = function(params) {
|
||||||
|
this.type = 'expect';
|
||||||
|
this.matcherName = params.matcherName;
|
||||||
|
this.passed_ = params.passed;
|
||||||
|
this.expected = params.expected;
|
||||||
|
this.actual = params.actual;
|
||||||
|
this.message = this.passed_ ? 'Passed.' : params.message;
|
||||||
|
|
||||||
|
var trace = (params.trace || new Error(this.message));
|
||||||
|
this.trace = this.passed_ ? '' : trace;
|
||||||
|
};
|
||||||
|
|
||||||
|
jasmine.ExpectationResult.prototype.toString = function () {
|
||||||
|
return this.message;
|
||||||
|
};
|
||||||
|
|
||||||
|
jasmine.ExpectationResult.prototype.passed = function () {
|
||||||
|
return this.passed_;
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Environment for Jasmine
|
* Environment for Jasmine
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
jasmine.ExpectationResult = function(params) {
|
||||||
|
this.type = 'expect';
|
||||||
|
this.matcherName = params.matcherName;
|
||||||
|
this.passed_ = params.passed;
|
||||||
|
this.expected = params.expected;
|
||||||
|
this.actual = params.actual;
|
||||||
|
this.message = this.passed_ ? 'Passed.' : params.message;
|
||||||
|
|
||||||
|
var trace = (params.trace || new Error(this.message));
|
||||||
|
this.trace = this.passed_ ? '' : trace;
|
||||||
|
};
|
||||||
|
|
||||||
|
jasmine.ExpectationResult.prototype.toString = function () {
|
||||||
|
return this.message;
|
||||||
|
};
|
||||||
|
|
||||||
|
jasmine.ExpectationResult.prototype.passed = function () {
|
||||||
|
return this.passed_;
|
||||||
|
};
|
||||||
@@ -102,26 +102,6 @@ jasmine.MessageResult.prototype.toString = function() {
|
|||||||
return text;
|
return text;
|
||||||
};
|
};
|
||||||
|
|
||||||
jasmine.ExpectationResult = function(params) {
|
|
||||||
this.type = 'expect';
|
|
||||||
this.matcherName = params.matcherName;
|
|
||||||
this.passed_ = params.passed;
|
|
||||||
this.expected = params.expected;
|
|
||||||
this.actual = params.actual;
|
|
||||||
this.message = this.passed_ ? 'Passed.' : params.message;
|
|
||||||
|
|
||||||
var trace = (params.trace || new Error(this.message));
|
|
||||||
this.trace = this.passed_ ? '' : trace;
|
|
||||||
};
|
|
||||||
|
|
||||||
jasmine.ExpectationResult.prototype.toString = function () {
|
|
||||||
return this.message;
|
|
||||||
};
|
|
||||||
|
|
||||||
jasmine.ExpectationResult.prototype.passed = function () {
|
|
||||||
return this.passed_;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for the Jasmine environment. Ensures one gets created
|
* Getter for the Jasmine environment. Ensures one gets created
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ class JasmineDev < Thor
|
|||||||
:core => [
|
:core => [
|
||||||
"base.js",
|
"base.js",
|
||||||
"util.js",
|
"util.js",
|
||||||
|
"ExpectationResult.js",
|
||||||
"Env.js",
|
"Env.js",
|
||||||
"Reporter.js",
|
"Reporter.js",
|
||||||
"Block.js",
|
"Block.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user