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
+9
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 is not expecting a done parameter'));
});
});
it('can configure specs to throw errors on expectation failures', function() {
env.throwOnExpectationFailure(true);