@@ -793,6 +793,9 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
|
||||
this.describe = function(description, specDefinitions) {
|
||||
var suite = suiteFactory(description);
|
||||
if (specDefinitions.length > 0) {
|
||||
throw new Error('describe does not expect a done parameter');
|
||||
}
|
||||
if (currentDeclarationSuite.markedPending) {
|
||||
suite.pend();
|
||||
}
|
||||
|
||||
@@ -26,6 +26,15 @@ describe("Env", function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#describe', function () {
|
||||
var spec = function(done){};
|
||||
it("throws the error", function() {
|
||||
expect(function() {
|
||||
env.describe('done method', spec);
|
||||
}).toThrow(new Error('describe does not expect a done parameter'));
|
||||
});
|
||||
});
|
||||
|
||||
it('can configure specs to throw errors on expectation failures', function() {
|
||||
env.throwOnExpectationFailure(true);
|
||||
|
||||
|
||||
@@ -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 does not expect a done parameter');
|
||||
}
|
||||
if (currentDeclarationSuite.markedPending) {
|
||||
suite.pend();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user