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

Failed to run unit test function #38

Closed
tubzby opened this issue Mar 24, 2023 · 5 comments · Fixed by #56
Closed

Failed to run unit test function #38

tubzby opened this issue Mar 24, 2023 · 5 comments · Fixed by #56

Comments

@tubzby
Copy link

tubzby commented Mar 24, 2023

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
Copy link
Collaborator

sergii4 commented Mar 27, 2023

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

@tubzby
Copy link
Author

tubzby commented Mar 28, 2023

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

@sergii4
Copy link
Collaborator

sergii4 commented Mar 28, 2023

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
Copy link
Author

tubzby commented Mar 29, 2023

@sergii4 got it!

@tubzby tubzby closed this as completed Mar 29, 2023
@sergii4
Copy link
Collaborator

sergii4 commented Jul 15, 2023

@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

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

Successfully merging a pull request may close this issue.

2 participants