Closed rluetzner closed 2 months ago
Same issue as well. Sometimes it works, sometimes it doesn't (applies to all commands, like watch, summary, etc.). Using rustaceanvim. Have had to abandon using neotest for now due to the issue. Tried versions 5.0.1, 5.0.0, and 4.9.0; issue occurs in all of them.
Can you please provide the logs as requested, the error suggests the setup is not completing correctly
Sorry @rcarriga , I forgot about this for a while. I've appended the log file to the bug report.
I did a quick scan myself, but couldn't find any errors or warnings in it.
Same issue here, I am using NvChad
{
"nvim-neotest/neotest",
lazy = false,
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter"
},
config = function()
require("neotest").setup({
disable_all = true,
enable = {
"test_nearest",
"test_file",
"test_suite",
"last_failed",
"visit",
"rerun",
"debug",
},
term_pos = "vert",
term_opener = "vsplit",
term_closer = "q",
term_geo = { "curwin", "vertical", "botright", "split" },
adapters = {
require('rustaceanvim.neotest')
},
}
)
end
},
@rluetzner I found the issue, don't call first run as function
.run().run()
it should be run.run()
Thank you. That did it! 🙂
NeoVim Version NVIM v0.9.5
Describe the bug When I try to run any test directly from a file, I get an exception that indicates that no client is set.
Surprisingly enough, when I open up the summary instead, all tests are discovered and can be run without problems. Well, almost...after I trigger the above exception once, I can't ran tests via the summary pane either.
To Reproduce Please provide a minimal
init.lua
to reproduce which can be run as the following:You can edit the following example file to include your adapters and other required setup.
Steps to reproduce the behavior:
<Leader>ts
to toggle the summary view.:lua require('neotest').run.run()
or<Leader>tt
to run the nearest test.Please provide example test files to reproduce. --> I will provide these, if it turns out that this cannot be reproduced with other languages. I don't have time to write a new set of C# or Go tests. I assume that this behavior is not limited to C# or Go and I'm surprised that nobody else seems to have reported it yet.
Expected behavior When I hit
<Leader>tt
or execute:lua require('neotest').run.run()
I should run the nearest test. When I hit<Leader>tf
, I should run all tests from the file.Logs neotest.log
Additional context Add any other context about the problem here.