allow undefined as function

This commit is contained in:
Tony Brix
2017-04-25 15:15:56 -05:00
committed by Gregg Van Hove
parent 0c7f36a181
commit d2b33e0c66
2 changed files with 6 additions and 6 deletions

View File

@@ -82,8 +82,8 @@ describe("Env", function() {
describe('#it', function () {
it('throws an error when it receives a non-fn argument', function() {
expect(function() {
env.it('undefined arg', undefined);
}).toThrowError(/it expects a function argument; received \[object (Undefined|DOMWindow|Object)\]/);
env.it('undefined arg', null);
}).toThrowError(/it expects a function argument; received \[object (Null|DOMWindow|Object)\]/);
});
it('does not throw when it is not given a fn argument', function() {
@@ -105,8 +105,8 @@ describe("Env", function() {
it('throws an error when it receives a non-fn argument', function() {
expect(function() {
env.xit('undefined arg', undefined);
}).toThrowError(/xit expects a function argument; received \[object (Undefined|DOMWindow|Object)\]/);
env.xit('undefined arg', null);
}).toThrowError(/xit expects a function argument; received \[object (Null|DOMWindow|Object)\]/);
});
it('does not throw when it is not given a fn argument', function() {