030
030

Reputation: 11719

How to get code coverage using gb?

Running gb:

gb test .../<regex>/... -v

works, but running gb test .../<regex>/... -coverprofile=cover.out results in:

testing: cannot use -test.coverprofile because test binary was not built with coverage enabled

while go test -coverprofile cover.out works. How to get code coverage using gb as well?

Upvotes: 0

Views: 531

Answers (1)

D&#225;vid Kaya
D&#225;vid Kaya

Reputation: 934

-coverprofile flag is not supported in gb yet.

You can check the status at https://github.com/constabulary/gb/issues/367.

There is also a workaround posted there, which you can use.

Upvotes: 1

Related Questions