Merge branch 'issue#896' of https://github.com/himajasuman/jasmine into himajasuman-issue#896

This commit is contained in:
Gregg Van Hove
2015-10-27 14:05:24 -07:00
2 changed files with 12 additions and 0 deletions

View File

@@ -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);

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 does not expect a done parameter');
}
if (currentDeclarationSuite.markedPending) {
suite.pend();
}