mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test(runtime/health): cover lua healthchecks
- Add tests for lua healthchecks (failure, success and submodules). - Reword some of the test naming for improved logs readability. - Modify render test to accomodate the changes of the health autoload function. - Add test for :checkhealth completion of Lua healtchecks.
This commit is contained in:
11
test/functional/fixtures/lua/test_plug/health/init.lua
Normal file
11
test/functional/fixtures/lua/test_plug/health/init.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
local M = {}
|
||||
local health = require("health")
|
||||
|
||||
M.check = function()
|
||||
health.report_start("report 1")
|
||||
health.report_ok("everything is fine")
|
||||
health.report_start("report 2")
|
||||
health.report_ok("nothing to see here")
|
||||
end
|
||||
|
||||
return M
|
||||
11
test/functional/fixtures/lua/test_plug/submodule/health.lua
Normal file
11
test/functional/fixtures/lua/test_plug/submodule/health.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
local M = {}
|
||||
local health = require("health")
|
||||
|
||||
M.check = function()
|
||||
health.report_start("report 1")
|
||||
health.report_ok("everything is fine")
|
||||
health.report_start("report 2")
|
||||
health.report_ok("nothing to see here")
|
||||
end
|
||||
|
||||
return M
|
||||
@@ -0,0 +1,12 @@
|
||||
local M = {}
|
||||
local health = require("health")
|
||||
|
||||
M.check = function()
|
||||
health.report_start("report 1")
|
||||
health.report_ok("everything is fine")
|
||||
health.report_warn("About to add a number to nil")
|
||||
local a = nil + 2
|
||||
return a
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user