Update describe error message to no longer assume errant args are done

Fixes #896
This commit is contained in:
Gregg Van Hove
2016-02-18 09:31:31 -08:00
parent c454658c54
commit 1e0381a495
3 changed files with 3 additions and 3 deletions

View File

@@ -795,7 +795,7 @@ getJasmineRequireObj().Env = function(j$) {
this.describe = function(description, specDefinitions) { this.describe = function(description, specDefinitions) {
var suite = suiteFactory(description); var suite = suiteFactory(description);
if (specDefinitions.length > 0) { if (specDefinitions.length > 0) {
throw new Error('describe does not expect a done parameter'); throw new Error('describe does not expect any arguments');
} }
if (currentDeclarationSuite.markedPending) { if (currentDeclarationSuite.markedPending) {
suite.pend(); suite.pend();

View File

@@ -31,7 +31,7 @@ describe("Env", function() {
it("throws the error", function() { it("throws the error", function() {
expect(function() { expect(function() {
env.describe('done method', spec); env.describe('done method', spec);
}).toThrow(new Error('describe does not expect a done parameter')); }).toThrow(new Error('describe does not expect any arguments'));
}); });
}); });

View File

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