When trying to debug_test a suite case it wrongfully assumes there are no tests #98
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
NeonXP/nvim-dap-go#98
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce:
go mod init ...main_test.gofilerequire('dap-go').debug_test()with the cursor inside one of the twost.Run(...)suites. For example, assuming you run on the secondst.Run, note that there will be a vim message likestarting debug session './src : another_test_here', which is the correct name, but then in the repl window you will see that it didn't find any test.Not sure but it seems that something is wrong with your test. I created the same folder structure than you and validated that the following test works fine:
I added breakpoints in all 3 tests the was able to debug as expected.
but where are you placing your cursor when running debug_test? if my cursor is placed inside a specific

t.Runit log a warning that there are no tests to run. see this first screenshot:however, if you place your cursor inside the

TestSuitefunction, then it will run, but it will run allt.Runsuite methods inside theTestSomethingfunction, where we actually only want to run one (first case)It is probably caused by the signature of your
TestSomething()function. Try to declare it asTestSomething(t *testing.T)instead.still the same problem, it doesn't find any tests to run .
It would work if I used the
tobject instead of the suite, but then I'd not be respecting the suite way of writing testsIt could be something related with the treesitter queries used to identify tests and sub-tests. It needs investigation in that part of the code:
leoluz/nvim-dap-go@6aa88167ea/lua/dap-go-ts.lua (L3-L25)This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.