[mini.test] Recommended setup for headless execution might not exit #1079
Replies: 3 comments 14 replies
-
Of course, the issue with just changing the makefile command to run |
Beta Was this translation helpful? Give feedback.
-
Glad 'mini.test' gets more traction. However, I don't really understand the issue here. It is more or less expected that actual setup is done properly so that it can actually run. Having hints for more robust scripts that utilize 'mini.test' are welcome, but somewhat out of scope for 'mini.test' itself. If you have any particular suggestions, we can discuss them. Also, I don't remember having any of CI problems due to listed reasons. Probably because testing locally and interactively prior to testing headless always seems like a good idea. |
Beta Was this translation helpful? Give feedback.
-
I agree that it would be bad practice to commit tests without running them locally, so it's not much of an issue. It just seemed like an incomplete UX to have headless mode not always automatically exit to terminal, but maybe that's just me. I could imagine a situation where CI is using a different neovim version than the local one (again, arguably PEBKAC) that introduced regressions and caused an error in a test file, preventing CI termination. There are a few specific changes I made to the Makefile and
Can I also just confirm that
|
Beta Was this translation helpful? Give feedback.
-
Started playing aroung with mini.test because rolling my own testing ended up way more annoying than I thought. I found a small issue which is that in these situations, headless execution of
lua MiniTest.run()
and friends doesn't exit to the terminal, which could hang my CI:v:errmsg
, because settingcollect = { silent = true }
in setup suppresses the message, but the nvim process still does not exit (which is even worse)minimal_init.lua
(I think this gets picked up by the internal error buffer of the nvim process, bypassing mini.test completely, could be tricky to change)I tried setting
collect = { stop_on_error = true }
but that didn't help, as I suspect that option means "stop testing if we encounter ANY test failure", right?It seems like some of this could be solved by adding some checks for
#vim.api.nvim_list_uis() == 0
which should triggervim.cmd.quit
or something like that.Beta Was this translation helpful? Give feedback.
All reactions