Hi there,
I like chai.js a lot, but I find that the property matchers have been problematic for me for two related reasons. One is that if you accidentally misspell a property matcher, the test will always pass.
Example:
expect(bar).to.not.exsit
Will always pass because I have misspelled exist.
Compare this to
expect(bar).to.not.exsit()
which, if exist was a function matcher, would fail because that function is undefined.
The other reason is that it forces us to disable the no-unused-expressions eslint rule in order to use these property matchers.
So, is it possible to wholesale replace property matchers with functions matchers, and/or would Chai.js consider getting rid of the notion of property matchers entirely (big ask, I know, but unless I'm missing something, I believe them to be fundamentally flawed).
Thanks!
Aaron