Closed igorlfs closed 10 months ago
Hi, this is a bug since the code should work without it, but as a temporary workaround could you please call require"(neotest-gtest").setup({})
in your init.lua
. (see README.md - I just updated it). Please let me know if this works!
The documentation is a bit stale, but lately I did not have a lot of time on my hands, sorry :)
Indeed, adding require"(neotest-gtest").setup({})
fixes this issue, but now my tests aren't being found. Is there any structure my project should have, to ease test discovery?
I don't think so, you can check https://github.com/alfaix/neotest-gtest/tree/main/tests/integration/cpp for a working setup.
Your test files need to be named test_stuff.*
or stuff_test.*
You can also supply your own is_test_file(path)
function in config. The default one is here
You can also supply a custom root detection function, the default one is here
Okay, I tried to use the integration tests you provided, but I get ...lua/neotest-gtest/init.lua:122: Did not run tests: no tests selected to run
. I'm also getting the same error after I renamed my own test files to fit the default function, so I think we're getting there. Any ideas?
If you're running more than one file, you're probably running into this
Sorry, it's WIP :)
Sorry, it's WIP :)
No problem 😅
Hey, been a while, should be fixed now. See README.md for usage.
Hello,
I've been meaning to try this plugin. Today I gave it a shot, but I got the following error:
While it looks like an error with neotest itself, other adapters work fine. So I'm guessing neotest-gtest isn't picking up my root dir properly (which is set by a compile_commands.json). There might have been a breaking change upstream? Actually, to make other adapters work, I need to uninstall gtest's. Any ideas?