We are working on a full scale production app with go backend. For unit tests, we need to mock the dependent interfaces either by creating our own mock implementation of the interface or by using third party packages like *testify/mocks.*
If we use testify, there will be a tendency for the developers to use *assert *statements which is against the best practices in go unit tests. (We use t.Fail instead of asserts) If we create manual mocks, we will end up creating two implementations for each interface, one for the program and another for the unit testing. Also we cannot test by mocking with different outputs from the dependencies. example if the dependency return an error. Please suggest which the right approach here. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/0f206f01-36de-4856-b456-d1a0739f8c34n%40googlegroups.com.