From f112ac73bd340707173db4d28660e76aa96b36de Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 22 Apr 2024 02:43:24 +0200 Subject: [PATCH] fix: unreliable "checkhealth completions" test ref https://github.com/neovim/neovim/issues/19596 FAILED test/functional/plugin/health_spec.lua @ 37: :checkhealth completions can be listed via getcompletion() test/functional/plugin/health_spec.lua:40: Expected objects to be the same. Passed in: (string) 'provider.node' Expected: (string) 'provider.clipboard' stack traceback: test/functional/plugin/health_spec.lua:40: in function --- runtime/lua/vim/health.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/lua/vim/health.lua b/runtime/lua/vim/health.lua index 8326214604..d72a32b541 100644 --- a/runtime/lua/vim/health.lua +++ b/runtime/lua/vim/health.lua @@ -377,7 +377,9 @@ M._complete = function() end) -- vim.health is this file, which is not a healthcheck unique['vim'] = nil - return vim.tbl_keys(unique) + local rv = vim.tbl_keys(unique) + table.sort(rv) + return rv end --- Runs the specified healthchecks.