Added a throw error block in describe incase a function with arguments is passed in describe

This commit is contained in:
Himaja
2015-10-25 14:13:14 -04:00
parent 48f42eaa7d
commit 110cacab19
2 changed files with 12 additions and 0 deletions

View File

@@ -291,6 +291,9 @@ getJasmineRequireObj().Env = function(j$) {
this.describe = function(description, specDefinitions) {
var suite = suiteFactory(description);
if (specDefinitions.length > 0) {
throw new Error('describe is not expecting a done parameter');
}
if (currentDeclarationSuite.markedPending) {
suite.pend();
}