In one of my projects, I delegate (for good reasons) a lot of the heavy work of my foo package to an internal package, e.g.
package foo
import "github.com/jub0bs/foo/internal"
func Foo() string {
return internal.Foo()
}
When I write tests against function foo.Foo (in a foo_test package) and measure code coverage across my entire project, I'm surprised to observe that internal.Foo is reportedly not covered by any tests.
Is that expected? What am I to do to increase coverage of my internals? Obviously, I'd like to avoid duplicating my tests for my internal package and my foo package...