The readme covers how to mock a header file that is contained within the current project. However, when wanting to mock against an external dependency pulled in via bazel the paths differ slightly.
While this is fairly obvious once one is familiar with how the bazel syntax works for external references, it would still help having this reference here.
The readme covers how to mock a header file that is contained within the current project. However, when wanting to mock against an external dependency pulled in via bazel the paths differ slightly.
An example could be:
mock( name = "mock_ElasticNodemiddleware", srcs = ["@ElasticNodeMiddleware//:ElasticNodeMiddleware/elasticNodeMiddleware.h"], copts = ["-DTEST"], deps = ["@ElasticNodeMiddleware//:ElasticNodeMiddlewareLibHdr",], )
While this is fairly obvious once one is familiar with how the bazel syntax works for external references, it would still help having this reference here.