print started when the test run starts
This commit is contained in:
parent
c485c33a3c
commit
e6a080039f
@ -38,6 +38,16 @@ describe("TrivialNodeReporter", function() {
|
||||
|
||||
|
||||
describe('A Test Run', function(){
|
||||
|
||||
describe('Starts', function(){
|
||||
it("prints Started", function(){
|
||||
this.reporter.reportRunnerStarting();
|
||||
|
||||
expect(this.fakeSys.getOutput()).toEqual(
|
||||
"Started" + newline
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('A spec runs', function(){
|
||||
it("prints a green dot if the spec passes", function(){
|
||||
@ -66,7 +76,7 @@ describe("TrivialNodeReporter", function() {
|
||||
});
|
||||
|
||||
|
||||
describe('many specs run', function(){
|
||||
describe('Many specs run', function(){
|
||||
it("starts a new line every 50 specs", function(){
|
||||
var self = this;
|
||||
repeatedlyInvoke(function(){self.reporter.reportSpecResults(failingSpec);}, 49);
|
||||
|
@ -15,10 +15,13 @@ jasmine.TrivialNodeReporter = function(sys) {
|
||||
function redStr(str) { return coloredStr("red", str); }
|
||||
function yellowStr(str) { return coloredStr("yellow", str); }
|
||||
|
||||
function newline() { sys.print("\n"); }
|
||||
function started() { sys.print("Started"); newline(); }
|
||||
function greenDot() { sys.print(greenStr(".")); }
|
||||
function redF() { sys.print(redStr("F")); }
|
||||
function yellowStar() { sys.print(yellowStr("*")); }
|
||||
function newline() { sys.print("\n"); }
|
||||
|
||||
|
||||
|
||||
|
||||
function lineEnder(columnsPerLine) {
|
||||
@ -34,6 +37,10 @@ jasmine.TrivialNodeReporter = function(sys) {
|
||||
|
||||
var startNewLineIfNecessary = lineEnder(defaultColumnsPerLine);
|
||||
|
||||
this.reportRunnerStarting = function() {
|
||||
started();
|
||||
};
|
||||
|
||||
this.reportSpecResults = function(spec) {
|
||||
var results = spec.results();
|
||||
if (results.skipped) {
|
||||
@ -45,21 +52,4 @@ jasmine.TrivialNodeReporter = function(sys) {
|
||||
}
|
||||
startNewLineIfNecessary();
|
||||
};
|
||||
};
|
||||
|
||||
// reportSpecResults: function(spec) {
|
||||
// var result = spec.results();
|
||||
// var msg = '';
|
||||
// if (result.passed())
|
||||
// {
|
||||
// msg = (colors) ? (ansi.green + '.' + ansi.none) : '.';
|
||||
// // } else if (result.skipped) { TODO: Research why "result.skipped" returns false when "xit" is called on a spec?
|
||||
// // msg = (colors) ? (ansi.yellow + '*' + ansi.none) : '*';
|
||||
// } else {
|
||||
// msg = (colors) ? (ansi.red + 'F' + ansi.none) : 'F';
|
||||
// }
|
||||
// sys.print(msg);
|
||||
// if (columnCounter++ < 50) return;
|
||||
// columnCounter = 0;
|
||||
// sys.print('\n');
|
||||
// },
|
||||
};
|
Loading…
Reference in New Issue
Block a user