Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoTestXXXX with flag -C for coverage not working #296

Closed
ybbond opened this issue Feb 21, 2023 · 2 comments
Closed

GoTestXXXX with flag -C for coverage not working #296

ybbond opened this issue Feb 21, 2023 · 2 comments

Comments

@ybbond
Copy link
Contributor

ybbond commented Feb 21, 2023

Summary

I tried

GoTest -n -C=coverage.out
GoTest -n -C coverage.out
GoTestFunc -C=coverage.out
GoTestFunc -C coverage.out

but the output will always be

go test -run '^Test_AcceptLeadOfferHandler$' ./domain/leadassignments succeed

Other Case

other flag is working, such as

GoTestFunc -t test

outputs

go test -tags=test -run '^Test_AcceptLeadOfferHandler$' ./domain/leadassignments succeed

Expected Result

output for test function with coverage flag should be

go test -coverprofile=coverage.out -run '^Test_AcceptLeadOfferHandler$' ./domain/leadassignments succeed

Platform

  • latest macos
  • latest HEAD neovim
  • latest go.nvim
@ray-x
Copy link
Owner

ray-x commented Feb 21, 2023

You are correct. Seems this argument was broken.
I pushed a fix for it. Could you check if it works?
Thanks!

@ybbond
Copy link
Contributor Author

ybbond commented Feb 21, 2023

you are fast response and I really appreciate that!

however, I think the correct command flag should be -coverprofile. by that, the test coverage file not generated

I created PR for that, though I cannot run lua unit test so I rely on GitHub runner


EDIT:
tried on local, it works

ray-x pushed a commit that referenced this issue Feb 21, 2023
* fix: coverage command should be coverprofile

* refactor: README
@ybbond ybbond closed this as completed Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants