Deprecate describes with no children

This commit is contained in:
Steve Gravrock
2020-02-12 16:44:44 -08:00
parent 18b2646d1d
commit c39c110eca
5 changed files with 36 additions and 2 deletions

View File

@@ -1034,6 +1034,13 @@ getJasmineRequireObj().Env = function(j$) {
suite.pend();
}
addSpecsToSuite(suite, specDefinitions);
if (suite.parentSuite && !suite.children.length) {
this.deprecated(
'describe with no children (describe() or it()) is ' +
'deprecated and will be removed in a future version of Jasmine. ' +
'Please either remove the describe or add children to it.'
);
}
return suite;
};