Opitions about using getters and assertions

13 views
Skip to first unread message

Denis Bardadym

unread,
Jun 8, 2015, 10:11:40 AM6/8/15
to nod...@googlegroups.com
Hello, all.

I am working with should.js and there is one issue that i would like to see more opinions (https://github.com/shouldjs/should.js/pull/64). It is about replacing all getter assertions with function variants (aka .ok -> .ok() ). 
Purpose of this to remove false positive results when you mistype getter name, which is greatly handled with linters now (unused expressions etc). By idea there could help es6 proxy, but it is still bad supported.
This was  one time resolved by chaijs, but i do not like their solution. IIRC they return as a result of getter some noop function which contains all fields of assertions.

Thanks.
Reply all
Reply to author
Forward
0 new messages