DEV Community

Discussion on: Learn Go by writing tests

Collapse
 
cumirror profile image
tongjin

It help a lot that the behaviour of the code is more importance than the way how it is done.

Usually, we reduce the internal coupling through the interface(public API), so the behavior of the interface is crucial, and the test should focus on the interface to ensure it behaves as expected. At the angle of efficiency in testing, it is not necessary to pay much attention to the internal implementation.

Thread Thread
 
hippookool profile image
hippookool

I am very interested in this topic, thanks! paperminecraft.io