Bug 735805 part 5 - Mochitests that run no tests should fail; r=jmaher

This commit is contained in:
Aryeh Gregor 2012-03-16 16:07:16 -04:00
parent ec634c71c6
commit b52ac88eae

View File

@ -315,11 +315,6 @@ SimpleTest.report = function () {
var failed = 0;
var todo = 0;
// Report tests which did not actually check anything.
if (SimpleTest._tests.length == 0)
// ToDo: Do s/todo/ok/ when all the tests are fixed. (Bug 483407)
SimpleTest.todo(false, "[SimpleTest.report()] No checks actually run.");
var tallyAndCreateDiv = function (test) {
var cls, msg, div;
var diag = test.diag ? " - " + test.diag : "";
@ -686,6 +681,13 @@ SimpleTest.finish = function () {
+ "prematurely -- be sure to use "
+ "SimpleTest.waitForExplicitFinish().");
}
if (SimpleTest._tests.length == 0) {
SimpleTest.ok(false, "[SimpleTest.finish()] No checks actually run. "
+ "(You need to call ok(), is(), or similar "
+ "functions at least once. Make sure you use "
+ "SimpleTest.waitForExplicitFinish() if you need "
+ "it.)");
}
if (parentRunner) {
/* We're running in an iframe, and the parent has a TestRunner */