:lua require('neotest').run.run("path/to/file/or/directory") -- please replace value
Unfortunately, I cannot provide the code, however, I guess you can use your own one.
A bottom panel will be displayed with error lines. Select a random item immediately and press Enter
The error will be displayed.
Error output
Error executing vim.schedule lua callback: ...local/share/nvim_ansidev/lazy/neotest/lua/nio/tasks.lua:95: Async task failed without callback: The coroutine failed with this message:
...nsidev/lazy/neotest/lua/neotest/consumers/diagnostic.lua:95: attempt to perform arithmetic on a nil value
stack traceback:
...nsidev/lazy/neotest/lua/neotest/consumers/diagnostic.lua: in function 'create_diagnostics'
...nsidev/lazy/neotest/lua/neotest/consumers/diagnostic.lua:54: in function 'draw_buffer'
...nsidev/lazy/neotest/lua/neotest/consumers/diagnostic.lua:163: in function 'draw_buffer'
...nsidev/lazy/neotest/lua/neotest/consumers/diagnostic.lua:173: in function 'listener'
..._ansidev/lazy/neotest/lua/neotest/client/events/init.lua:51: in function <..._ansidev/lazy/neotest/lua/neotest/client/events/init.lua:47>
stack traceback:
[C]: in function 'error'
....local/share/nvim_ansidev/lazy/neotest/lua/nio/tasks.lua:95: in function 'close_task'
....local/share/nvim_ansidev/lazy/neotest/lua/nio/tasks.lua:117: in function 'cb'
....local/share/nvim_ansidev/lazy/neotest/lua/nio/tasks.lua:179: in function <....local/share/nvim_ansidev/lazy/neotest/lua/nio/tasks.lua:178>
Reproduce
Unfortunately, I cannot provide the code, however, I guess you can use your own one.
A bottom panel will be displayed with error lines. Select a random item immediately and press Enter
The error will be displayed.
Error output