I have a Jasmine test like this:
expect(array.length).toEqual(0);
This passes. Out of curiosity I changed it to:
expect(array.length).toEqual(false);
This test fails. I was under the impression that the toEqual method does a not-strict comparison. If we do
console.log(0 == false);
We get the output
true
So why is this test failing?