chain-jslib icon indicating copy to clipboard operation
chain-jslib copied to clipboard

Problem: Inconsistent coding convention

Open calvinaco opened this issue 4 years ago • 0 comments

So far I found two minor inconsistent between our coding styles. They are minor but I want to standardize them.

  1. Missing visibility of class methods. e.g. https://github.com/crypto-com/chain-jslib/pull/31/files#diff-1e6d3448427ae35f6ddf6c75d4aa4ead8d4e000f89ce6f2274c774d0cd7c8350R37
  2. 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 see It("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 ...").

calvinaco avatar Nov 05 '20 12:11 calvinaco