allow undefined as function
This commit is contained in:
committed by
Gregg Van Hove
parent
0c7f36a181
commit
d2b33e0c66
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user