nvim-neotest / neotest-go

MIT License
125 stars 43 forks source link

Failed to run unit test function #38

Closed tubzby closed 1 year ago

tubzby commented 1 year ago

I have a simple Golang project and a couple of lines of unit test function. When I run: lua require("neotest").run.run(), it fails with:

directory ../../local/uavm outside main module or its selected dependencies.

I have followed the installation instructions of neotest and neotest-go.

sergii4 commented 1 year ago

Hi @tubzby, issue caused by Go requirements itself itself. You have to run tests from module root directory

tubzby commented 1 year ago

Seems that it's not working properly inside a soft link directory, it works after I cd inside the link destination directory.

sergii4 commented 1 year ago

I mean it is how underlying tool, go test, works. You can check it by yourself running go test {your_dir} and compare results with neotest-go. I don't see what can we do on the adapter side

tubzby commented 1 year ago

@sergii4 got it!

sergii4 commented 1 year ago

@tubzby I reopen the issue, I assume we have to resolve it to make it easies to use for broader circle of people. I am working on it