Fixed SPEC HAS NO EXPECTATIONS warning in HTML reporter
[Finishes #153891435]
This commit is contained in:
@@ -54,10 +54,11 @@ jasmineRequire.HtmlReporter = function(j$) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ResultsStateBuilder.prototype.specStarted = function(result) {
|
ResultsStateBuilder.prototype.specStarted = function(result) {
|
||||||
this.currentParent.addChild(result, 'spec');
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ResultsStateBuilder.prototype.specDone = function(result) {
|
ResultsStateBuilder.prototype.specDone = function(result) {
|
||||||
|
this.currentParent.addChild(result, 'spec');
|
||||||
|
|
||||||
if (result.status !== 'disabled') {
|
if (result.status !== 'disabled') {
|
||||||
this.specsExecuted++;
|
this.specsExecuted++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ describe("New HtmlReporter", function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("when Jasmine is done", function() {
|
describe("when Jasmine is done", function() {
|
||||||
it("adds EMPTY to the link title of specs that have no expectations", function() {
|
it("adds a warning to the link title of specs that have no expectations", function() {
|
||||||
if (!window.console) {
|
if (!window.console) {
|
||||||
window.console = { error: function(){} };
|
window.console = { error: function(){} };
|
||||||
}
|
}
|
||||||
@@ -228,7 +228,7 @@ describe("New HtmlReporter", function() {
|
|||||||
reporter.initialize();
|
reporter.initialize();
|
||||||
reporter.jasmineStarted({});
|
reporter.jasmineStarted({});
|
||||||
reporter.suiteStarted({id: 1});
|
reporter.suiteStarted({id: 1});
|
||||||
reporter.specStarted({id: 1, status: 'passed', passedExpectations: [], failedExpectations: []});
|
reporter.specStarted({id: 1, passedExpectations: [], failedExpectations: []});
|
||||||
reporter.specDone({
|
reporter.specDone({
|
||||||
id: 1,
|
id: 1,
|
||||||
status: 'passed',
|
status: 'passed',
|
||||||
|
|||||||
@@ -25,10 +25,11 @@ jasmineRequire.HtmlReporter = function(j$) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ResultsStateBuilder.prototype.specStarted = function(result) {
|
ResultsStateBuilder.prototype.specStarted = function(result) {
|
||||||
this.currentParent.addChild(result, 'spec');
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ResultsStateBuilder.prototype.specDone = function(result) {
|
ResultsStateBuilder.prototype.specDone = function(result) {
|
||||||
|
this.currentParent.addChild(result, 'spec');
|
||||||
|
|
||||||
if (result.status !== 'disabled') {
|
if (result.status !== 'disabled') {
|
||||||
this.specsExecuted++;
|
this.specsExecuted++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user