-
Notifications
You must be signed in to change notification settings - Fork 79
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
When trying to debug_test a suite case it wrongfully assumes there are no tests #98
Comments
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: package main
import (
"fmt"
"testing"
)
func TestSuite(t *testing.T) {
t.Run("subtest with function literal", func(t *testing.T) {
t.FailNow()
})
}
func TestSomething(t *testing.T) {
t.Run("some test here", func(t *testing.T) {
t.SkipNow()
})
t.Run("another test here", func(t *testing.T) {
fmt.Println("here")
})
} I added breakpoints in all 3 tests the was able to debug as expected. |
It is probably caused by the signature of your |
It could be something related with the treesitter queries used to identify tests and sub-tests. It needs investigation in that part of the code: Lines 3 to 25 in 6aa8816
|
Steps to reproduce:
go mod init ...
main_test.go
filerequire('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.The text was updated successfully, but these errors were encountered: