neotest-go icon indicating copy to clipboard operation
neotest-go copied to clipboard

Test-Table feature only works partially

Open marcomayer opened this issue 2 years ago • 0 comments

Using the following test example:

`func TestSomeTest(t *testing.T) { tt := []struct { name string method string url string apiKey string status int }{ {name: "AccessDenied1", method: http.MethodGet, url: "/api/nothing", apiKey: "lalala", status: http.StatusForbidden}, {name: "AccessDenied2", method: http.MethodGet, url: "/api/nothing", apiKey: "lalala", status: http.StatusForbidden}, {name: "AccessDenied3", method: http.MethodGet, url: "/api/nothing", apiKey: "lalala", status: http.StatusForbidden}, {name: "AccessDenied4", method: http.MethodGet, url: "/api/nothing", apiKey: "lalala", status: http.StatusForbidden}, {name: "AccessDenied5", method: http.MethodGet, url: "/api/nothing", apiKey: "lalala", status: http.StatusForbidden}, {name: "AccessDenied6", method: http.MethodGet, url: "/api/nothing", apiKey: "lalala", status: http.StatusForbidden}, }

for _, tc := range tt {
	tc := tc
	t.Run(tc.name, func(t *testing.T) {
		fmt.Println(tc.name, tc.method, tc.url, tc.apiKey, tc.status)
	})
}

} And running it usinglua require('neotest').run.run()` It will run the whole test but only show checkmarks for some of the tests (seems random which ones it picks). Also looking at the neotest-summary I also just see 2-3 of the tests: image

I'm using the latest neovim stable 0.8.1 and the latest golang 0.19.4

marcomayer avatar Dec 08 '22 10:12 marcomayer