Update describe error message to no longer assume errant args are done
Fixes #896
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
@@ -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'));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user