I m using jasmine in conjunction to Js-test-driver using an adapter to connect them both.
I ve got the following test case:
describe("Undefined false", function(){
beforeEach(function(){
var undefFalse = false;
});
it("should return a defined value", function(){
expect(this.undefFalse).toBeDefined();
});
it("should return false", function(){
expect(this.undefFalse).toBeFalsy();
});
});
Whereas the second test succeeds as expected, the first fails with the following error:
Undefined false test.test that it should return a defined value failed (0,00 ms): AssertError: Expected undefined to be defined.
Why is it that false
should be undefined
?