diff options
author | kylo252 <[email protected]> | 2021-10-09 22:17:30 +0200 |
---|---|---|
committer | kylo252 <[email protected]> | 2021-10-09 22:17:30 +0200 |
commit | caf62bcfed4fc6cfed26164e39d22a568d21f9d0 (patch) | |
tree | 47f7ddcbe7ef10b6cffd8398dbfc215d94fc2fae /tests/plugins_load_spec.lua | |
parent | 4126e5765d69840660fab2a05bbc664ad0117b95 (diff) | |
parent | 82b7a35858479223c1e34bea2f64451ecf1e5f66 (diff) |
Merge remote-tracking branch 'origin/rolling'
Diffstat (limited to 'tests/plugins_load_spec.lua')
-rw-r--r-- | tests/plugins_load_spec.lua | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/plugins_load_spec.lua b/tests/plugins_load_spec.lua new file mode 100644 index 00000000..cf9ea3b6 --- /dev/null +++ b/tests/plugins_load_spec.lua @@ -0,0 +1,34 @@ +local a = require "plenary.async_lib.tests" + +a.describe("plugin-loader", function() + a.it("should be able to load default packages without errors", function() + local plugins = require "plugins" + require("plugin-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() + local plugins = require "plugins" + require("plugin-loader"):load { plugins, lvim.plugins } + + require("lsp").setup() + + local lsp_packages = { + "lspconfig", + "nlspsettings", + "null-ls", + } + + for _, plugin in ipairs(lsp_packages) do + assert.truthy(package.loaded[plugin]) + end + end) +end) |