3 ms·
If you want to make testing a bit less verbose, you can look into testify (https://github.com/stretchr/testify https://github.com/stretchr/testify), it adds som
by GhostVII 9y ago
If you want to make testing a bit less verbose, you can look into testify (https://github.com/stretchr/testify https://github.com/stretchr/testify), it adds some helpful assertions (no more 'if err != nil ...').
If you are using interfaces with dependency injection, it is easy to mock the dependencies of whatever you are unit testing implementing the interfaces you have defined in your testing file.