Our Mocha test suite has this line:
model.getResourceDependencies.should.be.a.Function;
the test code uses the should
library
as you can see the above expression is neither an assignment nor an invocation, or is it?
How does this work? Is there some sort of underlying mechanism onPropertyRead()
or something like that so that the should library can execute something even if no function is explicitly called?
By the way, it's damn near impossible to remember any of the should or chai APIs.