nvim-neotest / neotest-go

MIT License
133 stars 43 forks source link

Doesn't work well with testing file #3

Closed hahuang65 closed 2 years ago

hahuang65 commented 2 years ago

Running

require("neotest").run.run(vim.fn.expand("%"))

while in a Go test file (in this case, a non-main package) results in output like:

# command-line-arguments [command-line-arguments.test]
link_parser/link_parser_test.go:11:9: undefined: ParseLinks
link_parser/link_parser_test.go:12:12: undefined: Link
link_parser/link_parser_test.go:26:9: undefined: ParseLinks
link_parser/link_parser_test.go:27:12: undefined: Link
link_parser/link_parser_test.go:45:9: undefined: ParseLinks
link_parser/link_parser_test.go:46:12: undefined: Link
link_parser/link_parser_test.go:68:9: undefined: ParseLinks
link_parser/link_parser_test.go:69:12: undefined: Link 
FAIL    command-line-arguments [build failed]
akinsho commented 2 years ago

@hahuang65 this repo is user maintained and WIP, so if you are having issues with a specific test file I suggest you fork this project and add some logs to see what might be going wrong and raise a PR to fix it once you've found the issue.

akinsho commented 2 years ago

This should be fixed now, in the future please consider a PR to fix the issue rather an issue since it's up to the community using this plugin to fix and maintain it

hahuang65 commented 2 years ago

I'm sorry about that. I should have read the Contributing section. Thank you for your hard work!