Move ExpectationResult into its own file
This commit is contained in:
@@ -102,26 +102,6 @@ jasmine.MessageResult.prototype.toString = function() {
|
||||
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
|
||||
*/
|
||||
@@ -528,6 +508,25 @@ jasmine.util.extend = function(destination, source) {
|
||||
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
|
||||
*
|
||||
|
||||
19
src/core/ExpectationResult.js
Normal file
19
src/core/ExpectationResult.js
Normal file
@@ -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;
|
||||
};
|
||||
|
||||
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
|
||||
*/
|
||||
|
||||
@@ -3,6 +3,7 @@ class JasmineDev < Thor
|
||||
:core => [
|
||||
"base.js",
|
||||
"util.js",
|
||||
"ExpectationResult.js",
|
||||
"Env.js",
|
||||
"Reporter.js",
|
||||
"Block.js",
|
||||
|
||||
Reference in New Issue
Block a user