`expect(nil).notTo.beNil;` doesn't fail
xareelee opened this issue · comments
Xaree Lee commented
I tried the follow expectation:
expect(nil).toNot.beNil;
expect(nil).notTo.beNil;
expect(nil).to.beNil;
but all of them were not failed which first two should be.
paul.s commented
You are missing the parens to invoke the matcher beNil
e.g.
expect(nil).toNot.beNil()
Xaree Lee commented
Gosh! I'm so stupid that I didn't notice this. Maybe try to let the compiler complain this situation when this happens.
Thanks for your rapidly reply.