guide icon indicating copy to clipboard operation
guide copied to clipboard

Add some guides of writing go test

Open FlyingOnion opened this issue 5 years ago • 0 comments

I still have some confusions about writing units. I hope the guide could contains some suggestions of writing tests. Maybe you could consider:

  1. how to define cases?
  2. should we define both "pass" and "not pass" cases? or just "pass" cases?
  3. how to test errors (or fatals/panics, if needed)?
  4. (maybe difficult) some guides about mock or noop servers/clients.

Thank you.

FlyingOnion avatar Jan 21 '21 07:01 FlyingOnion