diff options
| author | Javier López <graulopezjavier@gmail.com> | 2021-08-03 16:09:26 -0500 |
|---|---|---|
| committer | Javier López <graulopezjavier@gmail.com> | 2021-10-04 14:28:54 -0500 |
| commit | c65f9560155a8f37b1a2fe15e1bdbebe191fc494 (patch) | |
| tree | f2e51de3c8439ef48a57126044b3955f3c44b24c /test/functional/fixtures/lua | |
| parent | 9249dcdda1bd40c291d661650df584583cac3cf4 (diff) | |
| download | rneovim-c65f9560155a8f37b1a2fe15e1bdbebe191fc494.tar.gz rneovim-c65f9560155a8f37b1a2fe15e1bdbebe191fc494.tar.bz2 rneovim-c65f9560155a8f37b1a2fe15e1bdbebe191fc494.zip | |
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.
Diffstat (limited to 'test/functional/fixtures/lua')
3 files changed, 34 insertions, 0 deletions
diff --git a/test/functional/fixtures/lua/test_plug/health/init.lua b/test/functional/fixtures/lua/test_plug/health/init.lua new file mode 100644 index 0000000000..d07632cff4 --- /dev/null +++ b/test/functional/fixtures/lua/test_plug/health/init.lua @@ -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 diff --git a/test/functional/fixtures/lua/test_plug/submodule/health.lua b/test/functional/fixtures/lua/test_plug/submodule/health.lua new file mode 100644 index 0000000000..d07632cff4 --- /dev/null +++ b/test/functional/fixtures/lua/test_plug/submodule/health.lua @@ -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 diff --git a/test/functional/fixtures/lua/test_plug/submodule_failed/health.lua b/test/functional/fixtures/lua/test_plug/submodule_failed/health.lua new file mode 100644 index 0000000000..3a8af6ebb2 --- /dev/null +++ b/test/functional/fixtures/lua/test_plug/submodule_failed/health.lua @@ -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 |