0

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?

030
  • 10,842
  • 12
  • 78
  • 123

1 Answers1

1

-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.

Dávid Kaya
  • 924
  • 4
  • 17