jasmine-headless-webkit/vendor/assets/javascripts/jasmine.HeadlessReporter.File.js

43 lines
1.5 KiB
JavaScript
Raw Normal View History

2011-12-12 17:22:32 +00:00
(function() {
2012-01-10 22:14:37 +00:00
var __hasProp = Object.prototype.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
2011-12-12 17:22:32 +00:00
2012-01-10 22:14:37 +00:00
jasmine.HeadlessReporter.File = (function(_super) {
2011-12-12 17:22:32 +00:00
2012-01-10 22:14:37 +00:00
__extends(File, _super);
2011-12-12 17:22:32 +00:00
function File() {
File.__super__.constructor.apply(this, arguments);
2011-12-12 17:22:32 +00:00
}
File.prototype.reportRunnerResults = function(runner) {
2011-12-12 17:22:32 +00:00
var output;
File.__super__.reportRunnerResults.call(this, runner);
2011-12-12 17:22:32 +00:00
output = "TOTAL||" + this.length + "||" + this.failedCount + "||" + (this._runtime()) + "||" + (JHW._hasErrors ? "T" : "F");
2011-12-29 23:37:23 +00:00
this.puts(output);
return this.puts("SEED||" + (JHW.getSeed()));
};
File.prototype.consoleLogUsed = function(msg) {
2011-12-29 23:37:23 +00:00
return this.puts("CONSOLE||" + msg);
2011-12-12 17:22:32 +00:00
};
File.prototype.reportSpecResults = function(spec) {
2011-12-12 17:22:32 +00:00
var _this = this;
File.__super__.reportSpecResults.call(this, spec);
2011-12-12 17:22:32 +00:00
return this._reportSpecResult(spec, {
success: function(results) {
2011-12-29 23:37:23 +00:00
return _this.puts("PASS||" + spec.getJHWSpecInformation());
2011-12-12 17:22:32 +00:00
},
failure: function(results) {
2011-12-29 23:37:23 +00:00
return _this.puts("FAIL||" + spec.getJHWSpecInformation());
2011-12-12 17:22:32 +00:00
}
});
};
return File;
2011-12-12 17:22:32 +00:00
2012-01-10 22:14:37 +00:00
})(jasmine.HeadlessReporter);
2011-12-12 17:22:32 +00:00
}).call(this);