You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing configuration related discussions.
I have updated to the latest version of Neotest.
I have updated to the latest version of neotest-golang.
I have checked the Neotest log for errors (see README for instructions on enabling it).
Neovim version (nvim -v)
0.10.3
Operating system/version
Gentoo Linux 6.12.7
Output from :checkhealth neotest-golang
neotest-golang: require("neotest-golang.health").check()
Requirements ~
- OK Binary 'go' found on PATH: /usr/bin/go
- OK Found go.mod file for /home/jamie/Development/playground/go/learn-go-with-tests/arrays-and-slices/main_test.go in /home/jamie/Development/playground/go/learn-go-with-tests/arrays-and-slices/go.mod
- OK Treesitter parser for go is installed
- OK neotest is available
- OK nvim-treesitter is available
- OK nio is available
- OK plenary is available
DAP (optional) ~
- OK Binary 'dlv' found on PATH: /usr/bin/dlv
- WARNING dap is not available
- WARNING dapui is not available
- WARNING dap-go is not available
Gotestsum (optional) ~
- OK Binary 'gotestsum' found on PATH: /home/jamie/go/bin/gotestsum
- Found gotestsum to be installed, but not set as test runner.
Sanitization (optional) ~
- OK Sanitization is disabled
Your Neotest and neotest-golang Lua setup
require("neotest").setup({
adapters= {
require("neotest-golang")({log_level=vim.log.levels.DEBUG}),
},
})
-- run all tests in file and display output panelvim.keymap.set('n', 'tf', function()
require("neotest").run.run(vim.fn.expand("%"))
require("neotest").output_panel.open()
end, { desc="Run all tests in file" })
Describe the problem
When running individual tests, I get the result of the the test in the output panel. However, when running all tests in the file, I do not get the outcome of the tests although the tests pass and I get the inline display showing passed within the test file.
Output where first set is running each test one by one and final output running all tests:
Debug shows successful output too:
DEBUG | 2025-02-06T10:16:54Z+0000 | ...im/plugged/neotest-golang/lua/neotest-golang/logging.lua:70 | Searching for go.mod in /home/jamie/Development/playground/go/neotest-bug
INFO | 2025-02-06T10:16:54Z+0000 | ...im/plugged/neotest-golang/lua/neotest-golang/logging.lua:82 | Found go.mod at /home/jamie/Development/playground/go/neotest-bug/go.mod
INFO | 2025-02-06T10:16:54Z+0000 | ...im/plugged/neotest-golang/lua/neotest-golang/logging.lua:82 | Running Go list: go list -f {
"Dir": {{printf "%q" .Dir}},
"ImportPath": "{{.ImportPath}}",
"Name": "{{.Name}}",
"TestGoFiles": [{{range $i, $f := .TestGoFiles}}{{if ne $i 0}},{{end}}"{{$f}}"{{end}}],
"XTestGoFiles": [{{range $i, $f := .XTestGoFiles}}{{if ne $i 0}},{{end}}"{{$f}}"{{end}}],
"Module": { "GoMod": {{printf "%q" .Module.GoMod}} }
} ./... in /home/jamie/Development/playground/go/neotest-bug
DEBUG | 2025-02-06T10:16:54Z+0000 | ...im/plugged/neotest-golang/lua/neotest-golang/logging.lua:70 | JSON-decoded 'go list' output: { {
Dir = "/home/jamie/Development/playground/go/neotest-bug",
ImportPath = "neotest-bug",
Module = {
GoMod = "/home/jamie/Development/playground/go/neotest-bug/go.mod"
},
Name = "main",
TestGoFiles = {},
XTestGoFiles = { "main_test.go" }
} }
INFO | 2025-02-06T10:16:54Z+0000 | ...im/plugged/neotest-golang/lua/neotest-golang/logging.lua:82 | Test command: go test -json -v -race -count=1 neotest-bug -run ^(^TestAdd$|^TestSub$)$
DEBUG | 2025-02-06T10:16:54Z+0000 | ...im/plugged/neotest-golang/lua/neotest-golang/logging.lua:70 | RunSpec: {
command = { "go", "test", "-json", "-v", "-race", "-count=1", "neotest-bug", "-run", "^(^TestAdd$|^TestSub$)$" },
context = {
golist_data = { {
Dir = "/home/jamie/Development/playground/go/neotest-bug",
ImportPath = "neotest-bug",
Module = {
GoMod = "/home/jamie/Development/playground/go/neotest-bug/go.mod"
},
Name = "main",
TestGoFiles = {},
XTestGoFiles = { "main_test.go" }
} },
pos_id = "/home/jamie/Development/playground/go/neotest-bug/main_test.go"
},
cwd = "/home/jamie/Development/playground/go/neotest-bug"
}
DEBUG | 2025-02-06T10:16:55Z+0000 | ...im/plugged/neotest-golang/lua/neotest-golang/logging.lua:70 | Runner 'go', raw output: { '{"Time":"2025-02-06T10:16:54.664187531Z","Action":"start","Package":"neotest-bug"}', '{"Time":"2025-02-06T10:16:54.671044982Z","Action":"run","Package":"neotest-bug","Test":"TestAdd"}', '{"Time":"2025-02-06T10:16:54.671056875Z","Action":"output","Package":"neotest-bug","Test":"TestAdd","Output":"=== RUN TestAdd\\n"}', '{"Time":"2025-02-06T10:16:54.671103283Z","Action":"output","Package":"neotest-bug","Test":"TestAdd","Output":"--- PASS: TestAdd (0.00s)\\n"}', '{"Time":"2025-02-06T10:16:54.671130374Z","Action":"pass","Package":"neotest-bug","Test":"TestAdd","Elapsed":0}', '{"Time":"2025-02-06T10:16:54.671135544Z","Action":"run","Package":"neotest-bug","Test":"TestSub"}', '{"Time":"2025-02-06T10:16:54.671138329Z","Action":"output","Package":"neotest-bug","Test":"TestSub","Output":"=== RUN TestSub\\n"}', '{"Time":"2025-02-06T10:16:54.671168196Z","Action":"output","Package":"neotest-bug","Test":"TestSub","Output":"--- PASS: TestSub (0.00s)\\n"}', '{"Time":"2025-02-06T10:16:54.671194906Z","Action":"pass","Package":"neotest-bug","Test":"TestSub","Elapsed":0}', '{"Time":"2025-02-06T10:16:54.671198633Z","Action":"output","Package":"neotest-bug","Output":"PASS\\n"}', '{"Time":"2025-02-06T10:16:55.672895918Z","Action":"output","Package":"neotest-bug","Output":"ok \\tneotest-bug\\t1.009s\\n"}', '{"Time":"2025-02-06T10:16:55.6729283Z","Action":"pass","Package":"neotest-bug","Elapsed":1.009}' }
DEBUG | 2025-02-06T10:16:55Z+0000 | ...im/plugged/neotest-golang/lua/neotest-golang/logging.lua:70 | Final internal test result data {
["/home/jamie/Development/playground/go/neotest-bug/main_test.go::TestAdd"] = {
duplicate_test_detected = false,
errors = {},
gotest_data = {
name = "TestAdd",
output = { "=== RUN TestAdd\n" },
pkg = "neotest-bug"
},
neotest_data = {
id = "/home/jamie/Development/playground/go/neotest-bug/main_test.go::TestAdd",
name = "TestAdd",
path = "/home/jamie/Development/playground/go/neotest-bug/main_test.go",
range = { 6, 0, 10, 1 },
type = "test"
},
status = "passed"
},
["/home/jamie/Development/playground/go/neotest-bug/main_test.go::TestSub"] = {
duplicate_test_detected = false,
errors = {},
gotest_data = {
name = "TestSub",
output = { "=== RUN TestSub\n" },
pkg = "neotest-bug"
},
neotest_data = {
id = "/home/jamie/Development/playground/go/neotest-bug/main_test.go::TestSub",
name = "TestSub",
path = "/home/jamie/Development/playground/go/neotest-bug/main_test.go",
range = { 12, 0, 16, 1 },
type = "test"
},
status = "passed"
}
}
DEBUG | 2025-02-06T10:16:55Z+0000 | ...im/plugged/neotest-golang/lua/neotest-golang/logging.lua:70 | Final Neotest result data {
["/home/jamie/Development/playground/go/neotest-bug/main_test.go"] = {
output = "/tmp/nvim.jamie/ZaF4Kq/11",
status = "passed"
},
["/home/jamie/Development/playground/go/neotest-bug/main_test.go::TestAdd"] = {
errors = {},
output = "/tmp/nvim.jamie/ZaF4Kq/9",
status = "passed"
},
["/home/jamie/Development/playground/go/neotest-bug/main_test.go::TestSub"] = {
errors = {},
output = "/tmp/nvim.jamie/ZaF4Kq/10",
status = "passed"
}
}
```</div>
The text was updated successfully, but these errors were encountered:
Discussed in #282
Originally posted by jamiel February 6, 2025
Did you check docs and existing issues?
Neovim version (nvim -v)
0.10.3
Operating system/version
Gentoo Linux 6.12.7
Output from
:checkhealth neotest-golang
Your Neotest and neotest-golang Lua setup
Describe the problem
When running individual tests, I get the result of the the test in the output panel. However, when running all tests in the file, I do not get the outcome of the tests although the tests pass and I get the inline display showing passed within the test file.
Output where first set is running each test one by one and final output running all tests:
Debug shows successful output too:
The text was updated successfully, but these errors were encountered: