diff options
author | kylo252 <[email protected]> | 2022-01-03 15:49:07 +0100 |
---|---|---|
committer | kylo252 <[email protected]> | 2022-01-03 15:49:07 +0100 |
commit | e5aa8be8ce54097e4a34220cb2aad114e70f209b (patch) | |
tree | 15e0a3017358b15a0656b6d1f98d2638ae572095 /tests/specs/plugins_load_spec.lua | |
parent | 427ad868d404a254dcbc7d3950946dae0cf205de (diff) | |
parent | 21b41688ee8c5056ffbb2b07df141ce1ccb4b213 (diff) |
Merge branch 'rolling'
Diffstat (limited to 'tests/specs/plugins_load_spec.lua')
-rw-r--r-- | tests/specs/plugins_load_spec.lua | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/specs/plugins_load_spec.lua b/tests/specs/plugins_load_spec.lua new file mode 100644 index 00000000..08c96c12 --- /dev/null +++ b/tests/specs/plugins_load_spec.lua @@ -0,0 +1,35 @@ +local a = require "plenary.async_lib.tests" + +a.describe("plugin-loader", function() + local plugins = require "lvim.plugins" + local loader = require "lvim.plugin-loader" + + a.it("should be able to load default packages without errors", function() + loader:load { plugins, lvim.plugins } + + -- TODO: maybe there's a way to avoid hard-coding the names of the modules? + local startup_plugins = { + "packer", + } + + for _, plugin in ipairs(startup_plugins) do + assert.truthy(package.loaded[plugin]) + end + end) + + a.it("should be able to load lsp packages without errors", function() + loader:load { plugins, lvim.plugins } + + require("lvim.lsp").setup() + + local lsp_packages = { + "lspconfig", + "nlspsettings", + "null-ls", + } + + for _, plugin in ipairs(lsp_packages) do + assert.truthy(package.loaded[plugin]) + end + end) +end) |