chain-jslib
chain-jslib copied to clipboard
Problem: Inconsistent coding convention
So far I found two minor inconsistent between our coding styles. They are minor but I want to standardize them.
- Missing visibility of class methods. e.g. https://github.com/crypto-com/chain-jslib/pull/31/files#diff-1e6d3448427ae35f6ddf6c75d4aa4ead8d4e000f89ce6f2274c774d0cd7c8350R37
- Test case is not self-explantory. Since test cases are documentation of the functions. It should give more concrete description. I suggest the format
It("should {expected result} when {something happen}")
in general. When someone seeIt("check xxx validity")
, it may not reveal what is the correct behaviour. Of coz there is flexibility case by case. But for most cases this pattern can be followed. Also, it will be good to standardize the message toIt("should ...")
.